Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » cache » [javadoc | source]
org.hibernate.cache
public class: CacheKey [javadoc | source]
java.lang.Object
   org.hibernate.cache.CacheKey

All Implemented Interfaces:
    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().
Constructor:
 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.
    Parameters:
    id - The identifier associated with the cached data
    type - The Hibernate type mapping
    entityOrRoleName - The entity or collection-role name.
    entityMode - The entiyt mode of the originating session
    factory - The session factory for which we are caching
Method from org.hibernate.cache.CacheKey Summary:
equals,   getEntityOrRoleName,   getKey,   hashCode,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.cache.CacheKey Detail:
 public boolean equals(Object other) 
 public String getEntityOrRoleName() 
 public Serializable getKey() 
 public int hashCode() 
 public String toString()