|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectIdentity
Represents the identity of an individual domain object instance.
As implementations of ObjectIdentity are used as the key to represent domain objects in the ACL subsystem, it is essential that implementations provide methods so that object-equality rather than reference-equality can be relied upon reliably. In other words, the ACL subsystem can consider two ObjectIdentitys equal if identity1.equals(identity2), rather than reference-equality of identity1==identity2.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.io.Serializable |
getIdentifier()
Obtains the actual identifier. |
java.lang.String |
getType()
Obtains the "type" metadata for the domain object. |
int |
hashCode()
|
Method Detail |
---|
boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- to be compared
Object.equals(Object)
java.io.Serializable getIdentifier()
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 in the future such change will cascade to the ACL subsystem data.
java.lang.String getType()
int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |