Class CacheKeyImplementation

  • All Implemented Interfaces:

    public final class CacheKeyImplementation
    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(). This was named org.hibernate.cache.spi.CacheKey in Hibernate until version 5. Temporarily maintained as a reference while all components catch up with the refactoring to the caching interfaces.
    See Also:
    Serialized Form
    • Constructor Detail

      • CacheKeyImplementation

        public CacheKeyImplementation​(Object id,
                                      Type type,
                                      String entityOrRoleName,
                                      String tenantId,
                                      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.
        id - The identifier associated with the cached data
        type - The Hibernate type mapping
        entityOrRoleName - The entity or collection-role name.
        tenantId - The tenant identifier associated with this data.
        factory - The session factory for which we are caching