本文整理了Java中org.hibernate.annotations.Cache.region()
方法的一些代码示例,展示了Cache.region()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.region()
方法的具体详情如下:
包路径:org.hibernate.annotations.Cache
类名称:Cache
方法名:region
暂无
代码示例来源:origin: hibernate/hibernate-orm
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegionName = BinderHelper.isEmptyAnnotationValue( cacheAnn.region() ) ? null : cacheAnn.region();
cacheConcurrencyStrategy = EntityBinder.getCacheConcurrencyStrategy( cacheAnn.usage() );
}
else {
cacheConcurrencyStrategy = null;
cacheRegionName = null;
}
}
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
LOG.info("Cache invalidation event to be sent");
LOG.info("superclazz : " + superclazz.getName());
LOG.info("region : " + cacheAnnotation.region());
LOG.info("id : " + id);
detailMap.put("CACHE_REGION", new BroadleafSystemEventDetail("Cache Region", cacheAnnotation.region()));
detailMap.put("ENTITY_TYPE", new BroadleafSystemEventDetail("Entity Type", superclazz.getName()));
detailMap.put("IDENTIFIER", new BroadleafSystemEventDetail("Identifier", id));
代码示例来源:origin: hibernate/hibernate-orm
cacheRegion = effectiveCacheAnn.region();
switch ( effectiveCacheAnn.include().toLowerCase( Locale.ROOT ) ) {
case "all": {
if ( naturalIdCacheAnn != null ) {
if ( BinderHelper.isEmptyAnnotationValue( naturalIdCacheAnn.region() ) ) {
if ( explicitCacheAnn != null && StringHelper.isNotEmpty( explicitCacheAnn.region() ) ) {
naturalIdCacheRegion = explicitCacheAnn.region() + NATURAL_ID_CACHE_SUFFIX;
代码示例来源:origin: org.hibernate/hibernate-annotations
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegionName = BinderHelper.isDefault( cacheAnn.region() ) ? null : cacheAnn.region();
cacheConcurrencyStrategy = EntityBinder.getCacheConcurrencyStrategy( cacheAnn.usage() );
}
else {
cacheConcurrencyStrategy = null;
cacheRegionName = null;
}
}
代码示例来源:origin: org.hibernate/hibernate-annotations
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegion = BinderHelper.isDefault( cacheAnn.region() ) ?
null :
cacheAnn.region();
cacheConcurrentStrategy = getCacheConcurrencyStrategy( cacheAnn.usage() );
if ( "all".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = true;
}
else if ( "non-lazy".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = false;
}
else {
throw new AnnotationException( "Unknown lazy property annotations: " + cacheAnn.include() );
}
}
else {
cacheConcurrentStrategy = null;
cacheRegion = null;
cacheLazyProperty = true;
}
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegionName = BinderHelper.isDefault( cacheAnn.region() ) ? null : cacheAnn.region();
cacheConcurrencyStrategy = EntityBinder.getCacheConcurrencyStrategy( cacheAnn.usage() );
}
else {
cacheConcurrencyStrategy = null;
cacheRegionName = null;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegionName = BinderHelper.isEmptyAnnotationValue( cacheAnn.region() ) ? null : cacheAnn.region();
cacheConcurrencyStrategy = EntityBinder.getCacheConcurrencyStrategy( cacheAnn.usage() );
}
else {
cacheConcurrencyStrategy = null;
cacheRegionName = null;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegionName = BinderHelper.isEmptyAnnotationValue( cacheAnn.region() ) ? null : cacheAnn.region();
cacheConcurrencyStrategy = EntityBinder.getCacheConcurrencyStrategy( cacheAnn.usage() );
}
else {
cacheConcurrencyStrategy = null;
cacheRegionName = null;
}
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegionName = BinderHelper.isEmptyAnnotationValue( cacheAnn.region() ) ? null : cacheAnn.region();
cacheConcurrencyStrategy = EntityBinder.getCacheConcurrencyStrategy( cacheAnn.usage() );
}
else {
cacheConcurrencyStrategy = null;
cacheRegionName = null;
}
}
代码示例来源:origin: stackoverflow.com
Course c = new Course();
LookupCache lookupCache = c.getClass().getAnnotation(LookupCache.class);
Cache cache = lookupCache.annotationType().getAnnotation(Cache.class);
System.err.println("region " + cache.region());
System.err.println("usage " + cache.usage());
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegion = BinderHelper.isDefault( cacheAnn.region() ) ?
null :
cacheAnn.region();
cacheConcurrentStrategy = getCacheConcurrencyStrategy( cacheAnn.usage() );
if ( "all".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = true;
}
else if ( "non-lazy".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = false;
}
else {
throw new AnnotationException( "Unknown lazy property annotations: " + cacheAnn.include() );
}
}
else {
cacheConcurrentStrategy = null;
cacheRegion = null;
cacheLazyProperty = true;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegion = BinderHelper.isEmptyAnnotationValue( cacheAnn.region() ) ?
null :
cacheAnn.region();
cacheConcurrentStrategy = getCacheConcurrencyStrategy( cacheAnn.usage() );
if ( "all".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = true;
}
else if ( "non-lazy".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = false;
}
else {
throw new AnnotationException( "Unknown lazy property annotations: " + cacheAnn.include() );
}
}
else {
cacheConcurrentStrategy = null;
cacheRegion = null;
cacheLazyProperty = true;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public void setCache(Cache cacheAnn) {
if ( cacheAnn != null ) {
cacheRegion = BinderHelper.isEmptyAnnotationValue( cacheAnn.region() ) ?
null :
cacheAnn.region();
cacheConcurrentStrategy = getCacheConcurrencyStrategy( cacheAnn.usage() );
if ( "all".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = true;
}
else if ( "non-lazy".equalsIgnoreCase( cacheAnn.include() ) ) {
cacheLazyProperty = false;
}
else {
throw new AnnotationException( "Unknown lazy property annotations: " + cacheAnn.include() );
}
}
else {
cacheConcurrentStrategy = null;
cacheRegion = null;
cacheLazyProperty = true;
}
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
cacheRegion = effectiveCacheAnn.region();
switch ( effectiveCacheAnn.include().toLowerCase( Locale.ROOT ) ) {
case "all": {
if ( naturalIdCacheAnn != null ) {
if ( BinderHelper.isEmptyAnnotationValue( naturalIdCacheAnn.region() ) ) {
if ( explicitCacheAnn != null && StringHelper.isNotEmpty( explicitCacheAnn.region() ) ) {
naturalIdCacheRegion = explicitCacheAnn.region() + NATURAL_ID_CACHE_SUFFIX;
内容来源于网络,如有侵权,请联系作者删除!