CacheKeypublic class CacheKey extends Object implements SerializableAllows multiple entity classes / collection roles to be
stored in the same cache region. Also allows for composite
keys which do not properly implement equals()/hashCode(). |
Fields Summary |
---|
private final Serializable | key | private final org.hibernate.type.Type | type | private final String | entityOrRoleName | private final org.hibernate.EntityMode | entityMode | private final int | hashCode |
Methods Summary |
---|
public boolean | equals(java.lang.Object other)
if ( !(other instanceof CacheKey) ) return false;
CacheKey that = (CacheKey) other;
return entityOrRoleName.equals( that.entityOrRoleName )
&& type.isEqual( key, that.key, entityMode );
| public java.lang.String | getEntityOrRoleName()
return entityOrRoleName;
| public java.io.Serializable | getKey()
return key;
| public int | hashCode()
return hashCode;
| public java.lang.String | toString()
return entityOrRoleName + '#" + key.toString();//"CacheKey#" + type.toString(key, sf);
|
|