ITransactedObject [message #1532] |
Mon, 19 May 2008 15:45  |
Eclipse User |
|
|
|
Originally posted by: ekkehard.gentz-software.de
I only want to verify if my understandig is correct:
1. each business object has to implement ITransactedObject
2. IObjectId has two properties:
version (seee my other question)
IObjectId
3. IObjectId has one property:
type
if I set the type to a qualified classname unique over my system
- this should be ok, I think.
4. IObjectId most important methods are equals() and hashcode() to verify,
that the object is unique identified.
I'm using a long as (technical) PrimaryKey
this PK is unique to the DB Table, but dependent from
inheritance strategy not unique to a java BO
but together with the type its a unique identifier of the BO
so your contract is fullfilled
ekke
|
|
|
|
|
Re: ITransactedObject [message #1631 is a reply to message #1618] |
Tue, 20 May 2008 06:52  |
Eclipse User |
|
|
|
Originally posted by: ekkehard.gentz-software.de
fine :-)
btw: I have a "short" qualified name of the classes -
unique in my domain (simple parent package name + class name)
ekke
|
|
|
Re: ITransactedObject [message #570450 is a reply to message #1532] |
Mon, 19 May 2008 15:48  |
Eclipse User |
|
|
|
Originally posted by: ekkehard.gentz-software.de
sorry a type
2. should be
2. ITransactedObject has two properties:
version (seee my other question)
IObjectId
|
|
|
Re: ITransactedObject [message #570654 is a reply to message #1532] |
Tue, 20 May 2008 06:43  |
Eclipse User |
|
|
|
see below
ekke schrieb:
> I only want to verify if my understandig is correct:
>
> 1. each business object has to implement ITransactedObject
Yes
>
> 2. IObjectId has two properties:
> version (seee my other question)
> IObjectId
ITransactedObject as you correct but yes again
>
> 3. IObjectId has one property:
> type
> if I set the type to a qualified classname unique over my system
> - this should be ok, I think.
IObjectId has one property that you can access which is the type. The type is type of object.
If you use the FQN that is probably a pretty long string, but ok. There should not be two types with
the same name, whether its "CustomerRec" or
" org.eclipse.riena.same.path.and.some.more.CustomerSpecificIm plementationClass " is really your decision.
> 4. IObjectId most important methods are equals() and hashcode() to
> verify,
> that the object is unique identified.
> I'm using a long as (technical) PrimaryKey
> this PK is unique to the DB Table, but dependent from
> inheritance strategy not unique to a java BO
> but together with the type its a unique identifier of the BO
> so your contract is fullfilled
>
right ! the key to IObjectId is that the equals method can compare two object and tell the system
whether they are actually two instances of logical the same record. Together with the version then its
possible to go further and detect two instances of the same record with differnt versions. So the IObjectId
has to contain more that the type but some kind of PrimaryKey. If that is a long, no problem as long :-) it is
considered in the equals test
> ekke
>
|
|
|
Re: ITransactedObject [message #570723 is a reply to message #1618] |
Tue, 20 May 2008 06:52  |
Eclipse User |
|
|
|
Originally posted by: ekkehard.gentz-software.de
fine :-)
btw: I have a "short" qualified name of the classes -
unique in my domain (simple parent package name + class name)
ekke
|
|
|
Powered by
FUDForum. Page generated in 0.04767 seconds