Package org.hibernate.cache.spi

Examples of org.hibernate.cache.spi.NaturalIdRegion


        naturalIdAccessStrategy = ( NaturalIdRegionAccessStrategy ) entityAccessStrategies.get( naturalIdCacheRegionName );

        if ( naturalIdAccessStrategy == null && settings.isSecondLevelCacheEnabled() ) {
          final CacheDataDescriptionImpl cacheDataDescription = CacheDataDescriptionImpl.decode( model );

          NaturalIdRegion naturalIdRegion = null;
          try {
            naturalIdRegion = regionFactory.buildNaturalIdRegion( naturalIdCacheRegionName, properties,
                cacheDataDescription );
          }
          catch ( UnsupportedOperationException e ) {
            LOG.warnf(
                "Shared cache region factory [%s] does not support natural id caching; " +
                    "shared NaturalId caching will be disabled for not be enabled for %s",
                regionFactory.getClass().getName(),
                model.getEntityName()
            );
          }

          if (naturalIdRegion != null) {
            naturalIdAccessStrategy = naturalIdRegion.buildAccessStrategy( regionFactory.getDefaultAccessType() );
            entityAccessStrategies.put( naturalIdCacheRegionName, naturalIdAccessStrategy );
            cacheAccess.addCacheRegionnaturalIdCacheRegionName, naturalIdRegion );
          }
        }
      }
View Full Code Here


        naturalIdAccessStrategy = ( NaturalIdRegionAccessStrategy ) entityAccessStrategies.get( naturalIdCacheRegionName );

        if ( naturalIdAccessStrategy == null && settings.isSecondLevelCacheEnabled() ) {
          final CacheDataDescriptionImpl cacheDataDescription = CacheDataDescriptionImpl.decode( model );

          NaturalIdRegion naturalIdRegion = null;
          try {
            naturalIdRegion = regionFactory.buildNaturalIdRegion( naturalIdCacheRegionName, properties,
                cacheDataDescription );
          }
          catch ( UnsupportedOperationException e ) {
            LOG.warnf(
                "Shared cache region factory [%s] does not support natural id caching; " +
                    "shared NaturalId caching will be disabled for not be enabled for %s",
                regionFactory.getClass().getName(),
                model.getEntityName()
            );
          }

          if (naturalIdRegion != null) {
            naturalIdAccessStrategy = naturalIdRegion.buildAccessStrategy( regionFactory.getDefaultAccessType() );
            entityAccessStrategies.put( naturalIdCacheRegionName, naturalIdAccessStrategy );
            cacheAccess.addCacheRegionnaturalIdCacheRegionName, naturalIdRegion );
          }
        }
      }
View Full Code Here

        naturalIdAccessStrategy = ( NaturalIdRegionAccessStrategy ) entityAccessStrategies.get( naturalIdCacheRegionName );
       
        if ( naturalIdAccessStrategy == null && settings.isSecondLevelCacheEnabled() ) {
          final CacheDataDescriptionImpl cacheDataDescription = CacheDataDescriptionImpl.decode( model );
         
          NaturalIdRegion naturalIdRegion = null;
          try {
            naturalIdRegion = regionFactory.buildNaturalIdRegion( naturalIdCacheRegionName, properties,
                cacheDataDescription );
          }
          catch ( UnsupportedOperationException e ) {
            LOG.warnf(
                "Shared cache region factory [%s] does not support natural id caching; " +
                    "shared NaturalId caching will be disabled for not be enabled for %s",
                regionFactory.getClass().getName(),
                model.getEntityName()
            );
          }
         
          if (naturalIdRegion != null) {
            naturalIdAccessStrategy = naturalIdRegion.buildAccessStrategy( regionFactory.getDefaultAccessType() );
            entityAccessStrategies.put( naturalIdCacheRegionName, naturalIdAccessStrategy );
            cacheAccess.addCacheRegionnaturalIdCacheRegionName, naturalIdRegion );
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.hibernate.cache.spi.NaturalIdRegion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.