当前位置: 首页>>代码示例>>Java>>正文


Java ColumnResult类代码示例

本文整理汇总了Java中javax.persistence.ColumnResult的典型用法代码示例。如果您正苦于以下问题:Java ColumnResult类的具体用法?Java ColumnResult怎么用?Java ColumnResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ColumnResult类属于javax.persistence包,在下文中一共展示了ColumnResult类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildConstructorResult

import javax.persistence.ColumnResult; //导入依赖的package包/类
private static ConstructorResult buildConstructorResult(Element constructorResultElement, XMLContext.Default defaults) {
	AnnotationDescriptor constructorResultDescriptor = new AnnotationDescriptor( ConstructorResult.class );

	final Class entityClass = resolveClassReference( constructorResultElement.attributeValue( "target-class" ), defaults );
	constructorResultDescriptor.setValue( "targetClass", entityClass );

	List<ColumnResult> columnResultAnnotations = new ArrayList<ColumnResult>();
	for ( Element columnResultElement : (List<Element>) constructorResultElement.elements( "column" ) ) {
		columnResultAnnotations.add( buildColumnResult( columnResultElement, defaults ) );
	}
	constructorResultDescriptor.setValue(
			"columns",
			columnResultAnnotations.toArray( new ColumnResult[ columnResultAnnotations.size() ] )
	);

	return AnnotationFactory.create( constructorResultDescriptor );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:JPAOverriddenAnnotationReader.java

示例2: buildColumnResult

import javax.persistence.ColumnResult; //导入依赖的package包/类
private static ColumnResult buildColumnResult(Element columnResultElement, XMLContext.Default defaults) {
//		AnnotationDescriptor columnResultDescriptor = new AnnotationDescriptor( ColumnResult.class );
//		copyStringAttribute( columnResultDescriptor, columnResultElement, "name", true );
//		return AnnotationFactory.create( columnResultDescriptor );

		AnnotationDescriptor columnResultDescriptor = new AnnotationDescriptor( ColumnResult.class );
		copyStringAttribute( columnResultDescriptor, columnResultElement, "name", true );
		final String columnTypeName = columnResultElement.attributeValue( "class" );
		if ( StringHelper.isNotEmpty( columnTypeName ) ) {
			columnResultDescriptor.setValue( "type", resolveClassReference( columnTypeName, defaults ) );
		}
		return AnnotationFactory.create( columnResultDescriptor );
	}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:JPAOverriddenAnnotationReader.java


注:本文中的javax.persistence.ColumnResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。