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 voidaddCachedType(NavigableRole typeRole)Set<NavigableRole>getCachedTypes()The list of specific subclasses of the root that are actually written to cache.NavigableRolegetNavigableRole()TheNavigableRoleof the thing to be cachedSupplier<Comparator>getVersionComparatorAccess()Access to the comparator to be used with the entity's version.booleanisMutable()Is the data marked as being mutable?booleanisVersioned()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: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
-
getNavigableRole
public NavigableRole getNavigableRole()
Description copied from interface:DomainDataCachingConfigTheNavigableRoleof the thing to be cached- Specified by:
getNavigableRolein interfaceDomainDataCachingConfig
-
getCachedTypes
public Set<NavigableRole> getCachedTypes()
Description copied from interface:EntityDataCachingConfigThe list of specific subclasses of the root that are actually written to cache.- Specified by:
getCachedTypesin interfaceEntityDataCachingConfig
-
addCachedType
public void addCachedType(NavigableRole typeRole)
-
-