本文整理了Java中org.hibernate.annotations.Cache.usage()
方法的一些代码示例,展示了Cache.usage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.usage()
方法的具体详情如下:
包路径:org.hibernate.annotations.Cache
类名称:Cache
方法名:usage
暂无
代码示例来源: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: hibernate/hibernate-orm
cacheConcurrentStrategy = resolveCacheConcurrencyStrategy( effectiveCacheAnn.usage() );
cacheRegion = effectiveCacheAnn.region();
switch ( effectiveCacheAnn.include().toLowerCase( Locale.ROOT ) ) {
代码示例来源: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: 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 ) {
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: 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
cacheConcurrentStrategy = resolveCacheConcurrencyStrategy( effectiveCacheAnn.usage() );
cacheRegion = effectiveCacheAnn.region();
switch ( effectiveCacheAnn.include().toLowerCase( Locale.ROOT ) ) {
内容来源于网络,如有侵权,请联系作者删除!