|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ObjectIdentity
Interface representing the identity of an individual domain object instance.
As implementations are used as the key for caching and lookup, it is
essential that implementations provide methods so that object-equality
rather than reference-equality can be relied upon by caches. In other
words, a cache can consider two ObjectIdentitys equal if
identity1.equals(identity2), rather than reference-equality of
identity1==identity2.
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Refer to the java.lang.Object documentation for the interface contract. |
Serializable |
getIdentifier()
Obtains the actual identifier. |
Class |
getJavaType()
Obtains the Java type represented by the domain object. |
int |
hashCode()
Refer to the java.lang.Object documentation for the interface contract. |
| Method Detail |
|---|
boolean equals(Object obj)
java.lang.Object documentation for the interface contract.
equals in class Objectobj - to be compared
true if the objects are equal, false otherwiseSerializable getIdentifier()
javaType.Because ACLs are largely immutable, it is strongly recommended to use a synthetic identifier (such as a database sequence number for the primary key). Do not use an identifier with business meaning, as that business meaning may change.
javaTypeClass getJavaType()
int hashCode()
java.lang.Object documentation for the interface contract.
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||