org.hibernate.cache
Class CacheKey
java.lang.Object
   org.hibernate.cache.CacheKey
org.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
 
 
 
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.
 
- 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
 
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
equals
public boolean equals(Object other)
- 
- Overrides:
- equalsin class- Object
 
- 
 
hashCode
public int hashCode()
- 
- Overrides:
- hashCodein class- Object
 
- 
 
getKey
public Serializable getKey()
- 
 
- 
 
getEntityOrRoleName
public String getEntityOrRoleName()
- 
 
- 
 
Copyright © 2001-2010 Red Hat, Inc.  All Rights Reserved.