Package org.apache.openjpa.util
Class Id
java.lang.Object
org.apache.openjpa.util.OpenJPAId
org.apache.openjpa.util.Id
- All Implemented Interfaces:
Serializable
,Comparable
Datastore identity type. Implementations may choose to use this type,
or choose to use their own datastore identity values.
- Author:
- Abe White
- See Also:
-
Field Summary
Fields inherited from class org.apache.openjpa.util.OpenJPAId
subs, type, TYPE_VALUE_SEP
-
Constructor Summary
ConstructorDescriptionConstruct from key value.Construct from key value.Construct from key value.Construct from the result of aOpenJPAId.toString()
call on another instance.Create an id from the result of aOpenJPAId.toString()
call on another instance.Id
(String str, ClassLoader loader) Create an id from the result of anOpenJPAId.toString()
call on another instance.Id
(String str, OpenJPAConfiguration conf, ClassLoader brokerLoader) Create an id from the result of anOpenJPAId.toString()
call on another instance. -
Method Summary
Modifier and TypeMethodDescriptionlong
getId()
Primary key.Return the identity value as an object.protected boolean
Compare the id to the id of the given instance.protected int
idHash()
Return the id's hash code.static Id
newInstance
(Class cls, Object val) Create an id from the given type and value; the value might be an id instance, a stringified id, or a primary key value.Methods inherited from class org.apache.openjpa.util.OpenJPAId
compareTo, equals, getType, hashCode, hasSubclasses, setManagedInstanceType, setManagedInstanceType, toString
-
Constructor Details
-
Id
Create an id from the result of aOpenJPAId.toString()
call on another instance. -
Id
Create an id from the result of anOpenJPAId.toString()
call on another instance. -
Id
Create an id from the result of anOpenJPAId.toString()
call on another instance. -
Id
Construct from the result of aOpenJPAId.toString()
call on another instance. -
Id
Construct from key value. -
Id
Construct from key value. -
Id
Construct from key value.
-
-
Method Details
-
newInstance
Create an id from the given type and value; the value might be an id instance, a stringified id, or a primary key value. -
getId
public long getId()Primary key. -
getIdObject
Description copied from class:OpenJPAId
Return the identity value as an object.- Specified by:
getIdObject
in classOpenJPAId
-
idHash
protected int idHash()Description copied from class:OpenJPAId
Return the id's hash code. -
idEquals
Description copied from class:OpenJPAId
Compare the id to the id of the given instance.
-