org.hibernate.cache
Class CacheKey

java.lang.Object
  extended byorg.hibernate.cache.CacheKey
All Implemented Interfaces:
Serializable

public class CacheKey
extends Object
implements Serializable

Allows 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().

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
CacheKey(Serializable id, Type type, String entityOrRoleName, EntityMode entityMode, SessionFactoryImplementor factory)
          Construct a new key for a collection or entity instance.
 
Method Summary
 boolean equals(Object other)
           
 String getEntityOrRoleName()
           
 Serializable getKey()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheKey

public CacheKey(Serializable id,
                Type type,
                String entityOrRoleName,
                EntityMode entityMode,
                SessionFactoryImplementor factory)
Construct a new key for a collection or entity instance. Note that an entity name should always be the root entity name, not a subclass entity name.

Method Detail

toString

public String toString()

equals

public boolean equals(Object other)

hashCode

public int hashCode()

getKey

public Serializable getKey()

getEntityOrRoleName

public String getEntityOrRoleName()