Have a look at the OJB org.apache.ojb.broker.util.GUID class.

There is a little testcase that shows how to use store these GUIDs as 
strings into the DB and reconstruct a GUID on loading from the DB.

This is the entity class
src/test/org/apache/ojb/broker/GuidTestEntity.java
it uses a special FieldConversion to convert from GUID to STring (see in 
the repository_junit.xml)

cheers,
Thomas

Russell Smyth wrote:
> We have a need for the ability to extract from an object a unique ID (OID)
> that can be
> stored as a string, then used to recapture the original object. Essentially
> we need a 
> String GUID for each object.
> 
> Currently we are working with the PersistenceBroker.I had originally thought
> we could 
> use the Identity class, but there appears to be no way to reconstitute an
> Identity 
> from it's stringified (toString) representation.
> 
> Does anyone have any suggestions on a way to get where I am trying to get?
> 
> Thanks all
> 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]>

Reply via email to