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 TypeMethodDescriptionvoid
addCachedType
(NavigableRole typeRole) The list of specific subclasses of the root that are actually written to cache.TheNavigableRole
of the thing to be cachedAccess to the comparator to be used with the entity's version.boolean
Is the data marked as being mutable?boolean
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 Details
-
Method Details
-
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
-
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
-