I know there are many cases where a business object is used as a pk.
But why is there the need to use primitives to model these. What is the
"use case"? I think of something like this:
class Department
{
Division getDivision()
{
divisionId = getDeptId() % 100; // getDeptId() returns an int
return DivisionManager.getInstance(divisionId);
}
}
And if there is actually some case where such operations are required
are they so often that substituting getDeptId().intValue() would be a
problem?
john mcnally
On Fri, 2002-10-11 at 10:50, Russell Smyth wrote:
>
>
>
> > I'm confused as to why people need primitive representations
> > of pk's, I
> > can't think of any math one would want to do with them. They are not
> > supposed to have any business meaning.
>
> Because some of us have to use (legacy) databases defined by others who
> do not necessarily agree with your concept of PK's not having any business
> meaning.
>
> Besides which, I am not sure I agree with pk fields having no business
> meaning..
> many of our tables have pk fields which are our department or devision
> number -
> these obviously have business meaning, and are a necessary part of the pks!
>
> Russell
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>