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
ConstructorsConstructorDescriptionEntityDataCachingConfigImpl(NavigableRole rootEntityName, Supplier<Comparator> versionComparatorAccess, boolean isEntityMutable, AccessType accessType) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCachedType(NavigableRole typeRole) The list of specific subclasses of the root that are actually written to cache.TheNavigableRoleof the thing to be cachedAccess to the comparator to be used with the entity's version.booleanIs the data marked as being mutable?booleanMainly 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
getAccessTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.cache.cfg.spi.DomainDataCachingConfig
getAccessType
-
Constructor Details
-
Method Details
-
getVersionComparatorAccess
Description copied from interface:EntityDataCachingConfigAccess to the comparator to be used with the entity's version. If the entity is not versioned, then this method returnsnull.- Specified by:
getVersionComparatorAccessin interfaceEntityDataCachingConfig
-
isMutable
public boolean isMutable()Description copied from interface:DomainDataCachingConfigIs the data marked as being mutable?- Specified by:
isMutablein interfaceDomainDataCachingConfig
-
isVersioned
public boolean isVersioned()Description copied from interface:EntityDataCachingConfigMainly 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:
isVersionedin interfaceDomainDataCachingConfig- Specified by:
isVersionedin interfaceEntityDataCachingConfig
-
getCachedTypes
Description copied from interface:EntityDataCachingConfigThe list of specific subclasses of the root that are actually written to cache.- Specified by:
getCachedTypesin interfaceEntityDataCachingConfig
-