|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Builds Identity
objects to identify persistence capable objects within OJB.
In many cases the primary key (based on metadata declaration) of an object is known
and the whole object should be materialized (e.g. findByPrimaryKey(...) calls).
This class make available a bunch of methods help to create Identity
objects based on
Identity
.
This should be
used with care, because not all SequenceManager
implementations return the "real" UID value before the object was stored (e.g. when database based
Identity columns are used, a temporary placeholder is returned).
Method Summary | |
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.Class topLevelClass,
java.lang.Object[] pkValues)
Create a new Identity object based on given arguments - NOTE: There
will be no check to resolve the order of the PK values. |
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.Class topLevelClass,
java.lang.String[] pkFieldName,
java.lang.Object[] pkValues)
Build a unique Identity
for the given primary key values (composite PK's) of a
persistence capable object. |
Identity |
buildIdentity(ClassDescriptor cld,
java.lang.Object obj)
Build a unique Identity for the given
persistence capable object. |
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.Object pkValue)
Convenience method for persistent objects with single primary key. |
Identity |
buildIdentity(java.lang.Class realClass,
java.lang.String[] fieldName,
java.lang.Object[] pkValues)
Convenience method for buildIdentity(java.lang.Class, java.lang.Class, java.lang.String[], java.lang.Object[]) |
Identity |
buildIdentity(java.lang.Object obj)
Build a unique Identity for the given
persistence capable object. |
Method Detail |
public Identity buildIdentity(java.lang.Object obj)
Identity
for the given
persistence capable object.
obj
- The object to build the Identity
for.
public Identity buildIdentity(ClassDescriptor cld, java.lang.Object obj)
Identity
for the given
persistence capable object.
cld
- The ClassDescriptor
of the
object.obj
- The object to build the Identity
for.
public Identity buildIdentity(java.lang.Class realClass, java.lang.Class topLevelClass, java.lang.String[] pkFieldName, java.lang.Object[] pkValues)
Identity
for the given primary key values (composite PK's) of a
persistence capable object.
realClass
- The class of the associated object.topLevelClass
- The top-level class of the associated object.pkFieldName
- The field names of the PK fields.pkValues
- The PK values.
public Identity buildIdentity(java.lang.Class realClass, java.lang.String[] fieldName, java.lang.Object[] pkValues)
buildIdentity(java.lang.Class, java.lang.Class, java.lang.String[], java.lang.Object[])
public Identity buildIdentity(java.lang.Class realClass, java.lang.Object pkValue)
realClass
- The class of the associated object.pkValue
- The PK value.
buildIdentity(java.lang.Class, java.lang.String[], java.lang.Object[])
public Identity buildIdentity(java.lang.Class realClass, java.lang.Class topLevelClass, java.lang.Object[] pkValues)
Identity
object based on given arguments - NOTE: There
will be no check to resolve the order of the PK values. This method expect
the correct order.
realClass
- The class of the associated object.topLevelClass
- The top-level class of the associated object.pkValues
- The PK values.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |