Example usage for org.hibernate.cache.cfg.spi EntityDataCachingConfig isMutable

List of usage examples for org.hibernate.cache.cfg.spi EntityDataCachingConfig isMutable

Introduction

In this page you can find the example usage for org.hibernate.cache.cfg.spi EntityDataCachingConfig isMutable.

Prototype

boolean isMutable();

Source Link

Document

Is the data marked as being mutable?

Usage

From source file:org.infinispan.hibernate.cache.v53.impl.DomainDataRegionImpl.java

License:LGPL

@Override
public EntityDataAccess getEntityDataAccess(NavigableRole rootEntityRole) {
    EntityDataCachingConfig entityConfig = findConfig(config.getEntityCaching(), rootEntityRole);
    AccessType accessType = entityConfig.getAccessType();
    AccessDelegate accessDelegate = createAccessDelegate(accessType,
            entityConfig.isVersioned() ? entityConfig.getVersionComparatorAccess().get() : null);
    if (accessType == AccessType.READ_ONLY || !entityConfig.isMutable()) {
        return new ReadOnlyEntityDataAccess(accessType, accessDelegate, this);
    } else {/*from ww w  .  j  av a 2  s  .c o m*/
        return new ReadWriteEntityDataAccess(accessType, accessDelegate, this);
    }
}