|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.Identity
Represents the identity of an object.
It's composed of:
If in the metadata of an persistent capable object class the attribute autoincrement is set true, new primary key values will be automatic assigned to the given object passed as constructor argument.
NOTE: An Identity object must be unique accross extents. Means all objects with the same top-level class need unique PK values.
IdentityFactory
,
Serialized FormConstructor Summary | |
Identity(java.lang.Class realClass,
java.lang.Class topLevel,
java.lang.Object[] pkValues)
creates an Identity from a class and the objects primary key values. |
|
Identity(java.lang.Object objectToIdentitify,
PersistenceBroker targetBroker)
|
|
Identity(java.lang.Object objectToIdentitify,
PersistenceBroker targetBroker,
ClassDescriptor cld)
|
Method Summary | |
boolean |
equals(java.lang.Object obj)
Compare this Identity object to any other object. |
static Identity |
fromByteArray(byte[] anArray)
Deprecated. |
java.lang.Class |
getObjectsRealClass()
Return the "real" Class of the real subject |
java.lang.Class |
getObjectsTopLevelClass()
Return the top-level class of the real subject (means class name of a base class, base interface denoted in the repository or objects real class name if none top-level was found) |
java.lang.Object[] |
getPrimaryKeyValues()
return the list of Primary Key Values of the real subject |
int |
hashCode()
Calculate a hashcode for this Identity. |
byte[] |
serialize()
Deprecated. |
void |
setObjectsRealClass(java.lang.Class objectsRealClass)
Set the objects real class |
java.lang.String |
toString()
return a String representation. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Identity(java.lang.Class realClass, java.lang.Class topLevel, java.lang.Object[] pkValues)
realClass
- the concrete class of the object, or null if not known.topLevel
- the highest persistence-capable class or
interface (in the inheritance hierarchy) that the identified object is an instance ofpkValues
- (unique across the extents !)public Identity(java.lang.Object objectToIdentitify, PersistenceBroker targetBroker)
public Identity(java.lang.Object objectToIdentitify, PersistenceBroker targetBroker, ClassDescriptor cld)
Method Detail |
public static Identity fromByteArray(byte[] anArray) throws PersistenceBrokerException
serialize()
.
PersistenceBrokerException
public java.lang.Class getObjectsTopLevelClass()
public java.lang.Class getObjectsRealClass()
public void setObjectsRealClass(java.lang.Class objectsRealClass)
public byte[] serialize() throws PersistenceBrokerException
PersistenceBrokerException
fromByteArray(byte[])
public java.lang.String toString()
public java.lang.Object[] getPrimaryKeyValues()
public boolean equals(java.lang.Object obj)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |