Package org.hibernate.metamodel.binding

Examples of org.hibernate.metamodel.binding.Caching


    }

    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.valueOf(
        cacheAnnotation.value( "usage" ).asEnum()
    );
    Caching caching = new Caching( region, strategy.toAccessType(), cacheLazyProperties );
    entityBinding.setCaching( caching );
  }
View Full Code Here


    boolean cacheable = true; // true is the default
    if ( cacheAnnotation != null && cacheAnnotation.value() != null ) {
      cacheable = cacheAnnotation.value().asBoolean();
    }

    Caching caching = null;
    switch ( meta.getOptions().getSharedCacheMode() ) {
      case ALL: {
        caching = createCachingForCacheableAnnotation( entityBinding );
        break;
      }
View Full Code Here

  private Caching createCachingForCacheableAnnotation(EntityBinding entityBinding) {
    String region = entityBinding.getEntity().getName();
    RegionFactory regionFactory = meta.getServiceRegistry().getService( RegionFactory.class );
    AccessType defaultAccessType = regionFactory.getDefaultAccessType();
    return new Caching( region, defaultAccessType, true );
  }
View Full Code Here

      return null;
    }
    final String region = cache.getRegion() != null ? cache.getRegion() : entityName;
    final AccessType accessType = Enum.valueOf( AccessType.class, cache.getUsage() );
    final boolean cacheLazyProps = !"non-lazy".equals( cache.getInclude() );
    return new Caching( region, accessType, cacheLazyProps );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.binding.Caching

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.