use of org.hibernate.cache.cfg.spi.DomainDataCachingConfig in project infinispan by infinispan.
the class TestSessionAccessImpl method collectionAccess.
@Override
public Object collectionAccess(InfinispanBaseRegion region, AccessType accessType) {
DomainDataRegionImpl impl = (DomainDataRegionImpl) region;
NavigableRole role = impl.config().getCollectionCaching().stream().filter(c -> c.getAccessType() == accessType).map(DomainDataCachingConfig::getNavigableRole).findFirst().orElseThrow(() -> new IllegalArgumentException());
return impl.getCollectionDataAccess(role);
}
use of org.hibernate.cache.cfg.spi.DomainDataCachingConfig in project infinispan by infinispan.
the class TestSessionAccessImpl method entityAccess.
@Override
public Object entityAccess(InfinispanBaseRegion region, AccessType accessType) {
DomainDataRegionImpl impl = (DomainDataRegionImpl) region;
NavigableRole role = impl.config().getEntityCaching().stream().filter(c -> c.getAccessType() == accessType).map(DomainDataCachingConfig::getNavigableRole).findFirst().orElseThrow(() -> new IllegalArgumentException());
return impl.getEntityDataAccess(role);
}
Aggregations