Package org.hibernate.cache.cfg.internal
Class EntityDataCachingConfigImpl
- java.lang.Object
-
- org.hibernate.cache.cfg.internal.AbstractDomainDataCachingConfig
-
- org.hibernate.cache.cfg.internal.EntityDataCachingConfigImpl
-
- All Implemented Interfaces:
DomainDataCachingConfig
,EntityDataCachingConfig
public class EntityDataCachingConfigImpl extends AbstractDomainDataCachingConfig implements EntityDataCachingConfig
-
-
Constructor Summary
Constructors Constructor Description EntityDataCachingConfigImpl(NavigableRole rootEntityName, Supplier<Comparator> versionComparatorAccess, boolean isEntityMutable, AccessType accessType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCachedType(NavigableRole typeRole)
Set<NavigableRole>
getCachedTypes()
The list of specific subclasses of the root that are actually written to cache.NavigableRole
getNavigableRole()
TheNavigableRole
of the thing to be cachedSupplier<Comparator>
getVersionComparatorAccess()
Access to the comparator to be used with the entity's version.boolean
isMutable()
Is the data marked as being mutable?boolean
isVersioned()
Mainly here to allow optimization of not having to know the actual comparator instance to use here yet.-
Methods inherited from class org.hibernate.cache.cfg.internal.AbstractDomainDataCachingConfig
getAccessType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.cache.cfg.spi.DomainDataCachingConfig
getAccessType
-
-
-
-
Constructor Detail
-
EntityDataCachingConfigImpl
public EntityDataCachingConfigImpl(NavigableRole rootEntityName, Supplier<Comparator> versionComparatorAccess, boolean isEntityMutable, AccessType accessType)
-
-
Method Detail
-
getVersionComparatorAccess
public Supplier<Comparator> getVersionComparatorAccess()
Description copied from interface:EntityDataCachingConfig
Access to the comparator to be used with the entity's version. If the entity is not versioned, then this method returnsnull
.- Specified by:
getVersionComparatorAccess
in interfaceEntityDataCachingConfig
-
isMutable
public boolean isMutable()
Description copied from interface:DomainDataCachingConfig
Is the data marked as being mutable?- Specified by:
isMutable
in interfaceDomainDataCachingConfig
-
isVersioned
public boolean isVersioned()
Description copied from interface:EntityDataCachingConfig
Mainly here to allow optimization of not having to know the actual comparator instance to use here yet. If this method returnstrue
, then users can safely assume that accessingEntityDataCachingConfig.getVersionComparatorAccess()
will not produce a null Comparator later- Specified by:
isVersioned
in interfaceDomainDataCachingConfig
- Specified by:
isVersioned
in interfaceEntityDataCachingConfig
-
getNavigableRole
public NavigableRole getNavigableRole()
Description copied from interface:DomainDataCachingConfig
TheNavigableRole
of the thing to be cached- Specified by:
getNavigableRole
in interfaceDomainDataCachingConfig
-
getCachedTypes
public Set<NavigableRole> getCachedTypes()
Description copied from interface:EntityDataCachingConfig
The list of specific subclasses of the root that are actually written to cache.- Specified by:
getCachedTypes
in interfaceEntityDataCachingConfig
-
addCachedType
public void addCachedType(NavigableRole typeRole)
-
-