@Override public EntityRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException { if (AccessType.READ_ONLY.equals(accessType)) { return new EntityRegionAccessStrategyAdapter( new ReadOnlyAccessDelegate<HazelcastEntityRegion>(this, props)); } if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) { return new EntityRegionAccessStrategyAdapter( new NonStrictReadWriteAccessDelegate<HazelcastEntityRegion>(this, props)); } if (AccessType.READ_WRITE.equals(accessType)) { return new EntityRegionAccessStrategyAdapter( new ReadWriteAccessDelegate<HazelcastEntityRegion>(this, props)); } throw new CacheException("AccessType \"" + accessType + "\" is not currently supported by Hazelcast."); }
public EntityRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException { if (null == accessType) { throw new CacheException( "Got null AccessType while attempting to determine a proper EntityRegionAccessStrategy. This can't happen!"); } if (AccessType.READ_ONLY.equals(accessType)) { return new ReadOnlyAccessStrategy(this, props); } if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) { return new NonStrictReadWriteAccessStrategy(this, props); } if (AccessType.READ_WRITE.equals(accessType)) { return new ReadWriteAccessStrategy(this, props); } if (AccessType.TRANSACTIONAL.equals(accessType)) { throw new CacheException("Transactional access is not currently supported by Hazelcast."); } throw new CacheException("Got unknown AccessType \"" + accessType + "\" while attempting to build EntityRegionAccessStrategy."); }
public EntityRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException { if (null == accessType) { throw new CacheException( "Got null AccessType while attempting to determine a proper EntityRegionAccessStrategy. This can't happen!"); } if (AccessType.READ_ONLY.equals(accessType)) { return new EntityRegionAccessStrategyAdapter( new ReadOnlyAccessDelegate<HazelcastEntityRegion>(this, props)); } if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) { return new EntityRegionAccessStrategyAdapter( new NonStrictReadWriteAccessDelegate<HazelcastEntityRegion>(this, props)); } if (AccessType.READ_WRITE.equals(accessType)) { return new EntityRegionAccessStrategyAdapter( new ReadWriteAccessDelegate<HazelcastEntityRegion>(this, props)); } if (AccessType.TRANSACTIONAL.equals(accessType)) { throw new CacheException("Transactional access is not currently supported by Hazelcast."); } throw new CacheException("Got unknown AccessType \"" + accessType + "\" while attempting to build EntityRegionAccessStrategy."); }
public SingleTableEntityPersister(PersistentClass persistentClass, EntityRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory, Mapping mapping) throws HibernateException { super(persistentClass, cacheAccessStrategy, factory, mapping); this.hasSubselectLoadableCollections = persistentClass.hasSubselectLoadableCollections(); java.util.Iterator i = persistentClass.getSubclassIterator(); while(!this.hasSubselectLoadableCollections && i.hasNext()) { this.hasSubselectLoadableCollections = ((org.hibernate.mapping.PersistentClass) i.next()).hasSubselectLoadableCollections(); } }