Package org.hibernate.metamodel.source.hbm.xml.mapping

Examples of org.hibernate.metamodel.source.hbm.xml.mapping.XMLCacheElement


    }
    return null;
  }

  private static Caching createCaching(XMLHibernateMapping.XMLClass entityClazz, String entityName) {
    XMLCacheElement cache = entityClazz.getCache();
    if ( cache == null ) {
      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


    }
  }

  private void bindCaching(XMLClass xmlClazz,
               EntityBinding entityBinding) {
    XMLCacheElement cache = xmlClazz.getCache();
    if ( cache == null ) {
      return;
    }
    final String region = cache.getRegion() != null ? cache.getRegion() : entityBinding.getEntity().getName();
    final String strategy = cache.getUsage();
    final boolean cacheLazyProps = !"non-lazy".equals( cache.getInclude() );
    entityBinding.setCaching( new Caching( region, strategy, cacheLazyProps ) );
  }
View Full Code Here

    }
    isAbstract = entityClazz.isAbstract();
  }

  private static Caching createCaching(XMLHibernateMapping.XMLClass entityClazz, String entityName) {
    XMLCacheElement cache = entityClazz.getCache();
    if ( cache == null ) {
      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.source.hbm.xml.mapping.XMLCacheElement

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.