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


Java AssociationOverrides类代码示例

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


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

示例1: getAssociationOverrides

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
/**
 * @param mergeWithAnnotations Whether to use Java annotations for this
 * element, if present and not disabled by the XMLContext defaults.
 * In some contexts (such as an element-collection mapping) merging
 * with annotations is never allowed.
 */
private AssociationOverrides getAssociationOverrides(Element tree, XMLContext.Default defaults, boolean mergeWithAnnotations) {
	List<AssociationOverride> attributes = buildAssociationOverrides( tree, defaults );
	if ( mergeWithAnnotations && defaults.canUseJavaAnnotations() ) {
		AssociationOverride annotation = getPhysicalAnnotation( AssociationOverride.class );
		addAssociationOverrideIfNeeded( annotation, attributes );
		AssociationOverrides annotations = getPhysicalAnnotation( AssociationOverrides.class );
		if ( annotations != null ) {
			for ( AssociationOverride current : annotations.value() ) {
				addAssociationOverrideIfNeeded( current, attributes );
			}
		}
	}
	if ( attributes.size() > 0 ) {
		AnnotationDescriptor ad = new AnnotationDescriptor( AssociationOverrides.class );
		ad.setValue( "value", attributes.toArray( new AssociationOverride[attributes.size()] ) );
		return AnnotationFactory.create( ad );
	}
	else {
		return null;
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:JPAOverriddenAnnotationReader.java

示例2: buildJoinColumnOverride

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
private static Map<String, JoinColumn[]> buildJoinColumnOverride(XAnnotatedElement element, String path) {
	Map<String, JoinColumn[]> columnOverride = new HashMap<String, JoinColumn[]>();
	if ( element == null ) return columnOverride;
	AssociationOverride singleOverride = element.getAnnotation( AssociationOverride.class );
	AssociationOverrides multipleOverrides = element.getAnnotation( AssociationOverrides.class );
	AssociationOverride[] overrides;
	if ( singleOverride != null ) {
		overrides = new AssociationOverride[] { singleOverride };
	}
	else if ( multipleOverrides != null ) {
		overrides = multipleOverrides.value();
	}
	else {
		overrides = null;
	}

	//fill overridden columns
	if ( overrides != null ) {
		for (AssociationOverride depAttr : overrides) {
			columnOverride.put(
					StringHelper.qualify( path, depAttr.name() ),
					depAttr.joinColumns()
			);
		}
	}
	return columnOverride;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:AbstractPropertyHolder.java

示例3: buildJoinTableOverride

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
private static Map<String, JoinTable> buildJoinTableOverride(XAnnotatedElement element, String path) {
	Map<String, JoinTable> tableOverride = new HashMap<String, JoinTable>();
	if ( element == null ) return tableOverride;
	AssociationOverride singleOverride = element.getAnnotation( AssociationOverride.class );
	AssociationOverrides multipleOverrides = element.getAnnotation( AssociationOverrides.class );
	AssociationOverride[] overrides;
	if ( singleOverride != null ) {
		overrides = new AssociationOverride[] { singleOverride };
	}
	else if ( multipleOverrides != null ) {
		overrides = multipleOverrides.value();
	}
	else {
		overrides = null;
	}

	//fill overridden tables
	if ( overrides != null ) {
		for (AssociationOverride depAttr : overrides) {
			if ( depAttr.joinColumns().length == 0 ) {
				tableOverride.put(
						StringHelper.qualify( path, depAttr.name() ),
						depAttr.joinTable()
				);
			}
		}
	}
	return tableOverride;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:30,代码来源:AbstractPropertyHolder.java

示例4: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.getSudo", joinColumns = @JoinColumn(name = "GetSudo")),
       @AssociationOverride(name = "pk.bunruiKbn", joinColumns = @JoinColumn(name = "BunruiKbn"))
   })
public ClassificationCategoryIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:10,代码来源:IdoDataU.java

示例5: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
@AssociationOverrides({
    @AssociationOverride(name = "pk.parent", joinColumns = @JoinColumn(name = "ProGNo")),
    @AssociationOverride(name = "pk.srProNo", joinColumns = @JoinColumn(name = "SrProNo"))
})
public MenuIdentifier getPk() {
    return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:9,代码来源:MenuD.java

示例6: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.account", joinColumns = @JoinColumn(name = "KmkCode"))
   })
public BudgetPerformanceWorktableIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:9,代码来源:BudgetPerformanceWorktable.java

示例7: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.getSudo", joinColumns = @JoinColumn(name = "GetSudo"))
   })
public ClassificationCategoryWithoutBunruiKbnIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:9,代码来源:UriDataSK.java

示例8: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.srDate", joinColumns = @JoinColumn(name = "SrDate"))
   })
public StampAndLaborCostIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:9,代码来源:Stamp.java

示例9: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.getSudo", joinColumns = @JoinColumn(name = "GetSudo")),
       @AssociationOverride(name = "pk.account", joinColumns = @JoinColumn(name = "KmkCode"))
   })
public FixedSystemCostWorktableIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:10,代码来源:FixedSystemCostWorktable.java

示例10: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.vendor", joinColumns = @JoinColumn(name = "SrsCode")),
       @AssociationOverride(name = "pk.category", joinColumns = @JoinColumn(name = "CtgCode"))
   })
public SectorVendorIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:10,代码来源:SectorVendor.java

示例11: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode", columnDefinition = "TINYINT")),
       @AssociationOverride(name = "pk.getSudo", joinColumns = @JoinColumn(name = "GetSudo", columnDefinition = "TINYINT"))
   })
public ClassificationCategoryWithoutBunruiKbnIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:9,代码来源:VJiseki.java

示例12: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.jinjiKbn", joinColumns = @JoinColumn(name = "JinjiKbn")),
       @AssociationOverride(name = "pk.shoriDate", joinColumns = @JoinColumn(name = "ShoriDate"))
   })
public LaborCostWorktableIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:10,代码来源:LaborCostWorktable.java

示例13: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
@AssociationOverrides({
    @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
    @AssociationOverride(name = "pk.getSudo", joinColumns = @JoinColumn(name = "GetSudo")),
    @AssociationOverride(name = "pk.srDate", joinColumns = @JoinColumn(name = "SrDate"))
})
public SalesChangeIdentifier getPk() {
    return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:10,代码来源:Cash.java

示例14: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
@AssociationOverrides({
        @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
        @AssociationOverride(name = "pk.getSudo", joinColumns = @JoinColumn(name = "GetSudo")) })
public SalesFixedIdentifier getPk() {
    return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:8,代码来源:SalesFixed.java

示例15: getPk

import javax.persistence.AssociationOverrides; //导入依赖的package包/类
@EmbeddedId
   @AssociationOverrides({
       @AssociationOverride(name = "pk.organization", joinColumns = @JoinColumn(name = "StrCode")),
       @AssociationOverride(name = "pk.kojinCode", joinColumns = @JoinColumn(name = "KojinCode")),
       @AssociationOverride(name = "pk.shoriDate", joinColumns = @JoinColumn(name = "ShoriDate"))
   })
public StrokesLeakageTimeWorktableIdentifier getPk() {
	return pk;
}
 
开发者ID:dgks0n,项目名称:Harvest-JP,代码行数:10,代码来源:StrokesLeakageTimeWorktable.java


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