类javax.persistence.NamedEntityGraphs源码实例Demo

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

源代码1 项目: lams   文件: JPAOverriddenAnnotationReader.java
private NamedEntityGraphs getNamedEntityGraphs(Element tree, XMLContext.Default defaults) {
	List<NamedEntityGraph> queries = buildNamedEntityGraph( tree, defaults, classLoaderAccess );
	if ( defaults.canUseJavaAnnotations() ) {
		NamedEntityGraph annotation = getPhysicalAnnotation( NamedEntityGraph.class );
		addNamedEntityGraphIfNeeded( annotation, queries );
		NamedEntityGraphs annotations = getPhysicalAnnotation( NamedEntityGraphs.class );
		if ( annotations != null ) {
			for ( NamedEntityGraph current : annotations.value() ) {
				addNamedEntityGraphIfNeeded( current, queries );
			}
		}
	}
	if ( queries.size() > 0 ) {
		AnnotationDescriptor ad = new AnnotationDescriptor( NamedEntityGraphs.class );
		ad.setValue( "value", queries.toArray( new NamedEntityGraph[queries.size()] ) );
		return AnnotationFactory.create( ad );
	}
	else {
		return null;
	}
}
 
源代码2 项目: lams   文件: EntityBinder.java
private void processNamedEntityGraphs() {
	processNamedEntityGraph( annotatedClass.getAnnotation( NamedEntityGraph.class ) );
	final NamedEntityGraphs graphs = annotatedClass.getAnnotation( NamedEntityGraphs.class );
	if ( graphs != null ) {
		for ( NamedEntityGraph graph : graphs.value() ) {
			processNamedEntityGraph( graph );
		}
	}
}
 
 类所在包
 同包方法