Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » ITransactedObject
ITransactedObject [message #1532] Mon, 19 May 2008 19:45 Go to next message
Eclipse UserFriend
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 #1546 is a reply to message #1532] Mon, 19 May 2008 19:48 Go to previous messageGo to next message
Eclipse UserFriend
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 #1618 is a reply to message #1532] Tue, 20 May 2008 10:43 Go to previous messageGo to next message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
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 #1631 is a reply to message #1618] Tue, 20 May 2008 10:52 Go to previous message
Eclipse UserFriend
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 19:48 Go to previous message
Eclipse UserFriend
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 10:43 Go to previous message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
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 10:52 Go to previous message
Eclipse UserFriend
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
Previous Topic:ObjectTransactions version
Next Topic:ObjectTransaction - Enums
Goto Forum:
  


Current Time: Sun Sep 01 04:14:37 GMT 2024

Powered by FUDForum. Page generated in 0.03732 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top