public CacheKey(Serializable id,
Type type,
String entityOrRoleName,
EntityMode entityMode,
SessionFactoryImplementor factory) {
this.key = id;
this.type = type;
this.entityOrRoleName = entityOrRoleName;
this.entityMode = entityMode;
hashCode = type.getHashCode( key, entityMode, 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
|