org.acegisecurity.acls.objectidentity
public interface ObjectIdentity extends java.io.Serializable
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 ObjectIdentity
s equal if
identity1.equals(identity2)
, rather than reference-equality of
identity1==identity2
.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Refer to the
java.lang.Object documentation for the interface contract. |
java.io.Serializable |
getIdentifier()
Obtains the actual identifier.
|
java.lang.Class |
getJavaType()
Obtains the Java type represented by the domain object.
|
int |
hashCode()
Refer to the
java.lang.Object documentation for the interface contract. |
boolean equals(java.lang.Object obj)
java.lang.Object
documentation for the interface contract.equals
in class java.lang.Object
obj
- to be comparedtrue
if the objects are equal, false
otherwisejava.io.Serializable 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.
javaType
java.lang.Class getJavaType()
int hashCode()
java.lang.Object
documentation for the interface contract.hashCode
in class java.lang.Object
Copyright © 2004-2014 Interface21, Inc. All Rights Reserved.