public abstract class OpenJPAId
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected boolean |
subs |
protected java.lang.Class |
type |
Modifier | Constructor and Description |
---|---|
protected |
OpenJPAId() |
protected |
OpenJPAId(java.lang.Class type) |
protected |
OpenJPAId(java.lang.Class type,
boolean subs) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object other) |
boolean |
equals(java.lang.Object o) |
abstract java.lang.Object |
getIdObject()
Return the identity value as an object.
|
java.lang.Class |
getType()
Return the persistent class which this id instance represents.
|
int |
hashCode()
Generate the hashcode for this Id.
|
boolean |
hasSubclasses()
Whether this oid might be for a subclass of the given type.
|
protected abstract boolean |
idEquals(OpenJPAId other)
Compare the id to the id of the given instance.
|
protected abstract int |
idHash()
Return the id's hash code.
|
void |
setManagedInstanceType(java.lang.Class type)
Set the exact type of the described instance once it is known.
|
void |
setManagedInstanceType(java.lang.Class type,
boolean subs)
Set the exact type of the described instance once it is known.
|
java.lang.String |
toString() |
protected OpenJPAId()
protected OpenJPAId(java.lang.Class type)
protected OpenJPAId(java.lang.Class type, boolean subs)
public java.lang.Class getType()
public boolean hasSubclasses()
public void setManagedInstanceType(java.lang.Class type)
public void setManagedInstanceType(java.lang.Class type, boolean subs)
public abstract java.lang.Object getIdObject()
protected abstract int idHash()
protected abstract boolean idEquals(OpenJPAId other)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable