List of usage examples for org.hibernate.cache.cfg.spi EntityDataCachingConfig getCachedTypes
Set<NavigableRole> getCachedTypes();
From source file:org.infinispan.hibernate.cache.v53.impl.DomainDataRegionImpl.java
License:LGPL
private void prepareForVersionedEntries(CacheMode cacheMode) { if (strategy != null) { assert strategy == Strategy.VERSIONED_ENTRIES; return;//from www. j av a 2 s. c o m } prepareCommon(cacheMode); filter = VersionedEntry.EXCLUDE_EMPTY_VERSIONED_ENTRY; for (EntityDataCachingConfig entityConfig : config.getEntityCaching()) { if (entityConfig.isVersioned()) { for (NavigableRole role : entityConfig.getCachedTypes()) { comparatorsByType.put(role.getNavigableName(), entityConfig.getVersionComparatorAccess().get()); } } } for (CollectionDataCachingConfig collectionConfig : config.getCollectionCaching()) { if (collectionConfig.isVersioned()) { comparatorsByType.put(collectionConfig.getNavigableRole().getNavigableName(), collectionConfig.getOwnerVersionComparator()); } } strategy = Strategy.VERSIONED_ENTRIES; }