类org.hibernate.annotations.Proxy源码实例Demo

下面列出了怎么用org.hibernate.annotations.Proxy的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: lams   文件: EntityBinder.java
@SuppressWarnings({ "unchecked" })
public void setProxy(Proxy proxy) {
	if ( proxy != null ) {
		lazy = proxy.lazy();
		if ( !lazy ) {
			proxyClass = null;
		}
		else {
			final ReflectionManager reflectionManager = context.getBootstrapContext().getReflectionManager();
			if ( AnnotationBinder.isDefault( reflectionManager.toXClass( proxy.proxyClass() ), context ) ) {
				proxyClass = annotatedClass;
			}
			else {
				proxyClass = reflectionManager.toXClass( proxy.proxyClass() );
			}
		}
	}
	else {
		lazy = true; //needed to allow association lazy loading.
		proxyClass = annotatedClass;
	}
}
 
 类所在包
 类方法
 同包方法