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


Java ForeignKey类代码示例

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


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

示例1: getExtension

import javax.persistence.ForeignKey; //导入依赖的package包/类
@com.evolveum.midpoint.repo.sql.query.definition.Any(jaxbNameLocalPart = "extension")
@OneToOne(optional = true, orphanRemoval = true)
@Cascade({org.hibernate.annotations.CascadeType.ALL})
@JoinColumns(value = {
        @JoinColumn(name = "extOid", referencedColumnName = "owner_owner_oid"),
        @JoinColumn(name = "extId", referencedColumnName = "owner_id")
}, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
public RAssignmentExtension getExtension() {
    return extension;
}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:11,代码来源:RAssignment.java

示例2: getMovieStyleSet

import javax.persistence.ForeignKey; //导入依赖的package包/类
@ManyToMany(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
@JoinTable(name = "R_Movie_MovieStyle",
        joinColumns = {@JoinColumn(name = "movie_id", referencedColumnName = "movie_id", [email protected](name="FK_R_MovieStyle_Movie"))},
        inverseJoinColumns = {@JoinColumn(name = "movie_style_id", referencedColumnName ="movie_style_id", [email protected](name="FK_R_Movie_MovieStyle"))})
public Set<MovieStyle> getMovieStyleSet() {
    return movieStyleSet;
}
 
开发者ID:AwesomeTickets,项目名称:ServiceServer,代码行数:8,代码来源:Movie.java

示例3: getGoods8JPASet

import javax.persistence.ForeignKey; //导入依赖的package包/类
@OneToMany(targetEntity = Goods8JPA.class, cascade = CascadeType.ALL,
          fetch = FetchType.EAGER)
@JoinColumn(name = "join_user_goodsSet", foreignKey =
@ForeignKey(name = "join_fk_user_goodsSet"))
@JoinTable(name = "jpa_user_goodsSet_table", foreignKey =
@ForeignKey(name = "table_user_goodsSet"))
public Set<Goods8JPA> getGoods8JPASet()
{
    return goods8JPASet;
}
 
开发者ID:SessionFactory,项目名称:tinyshop8,代码行数:11,代码来源:User8JPA.java

示例4: getGoods8JPASet

import javax.persistence.ForeignKey; //导入依赖的package包/类
@OneToMany(targetEntity = Goods8JPA.class, cascade = ALL,
          fetch = EAGER)
@JoinColumn(name = "join_goods_type_m2o", foreignKey =
@ForeignKey(name = "fk_goods_type_m2o"))
@JoinTable(name = "jpa_goods_type_set", foreignKey =
@ForeignKey(name = "fk_jpa_goods_type_set"))
public Set<Goods8JPA> getGoods8JPASet()
{
    return goods8JPASet;
}
 
开发者ID:SessionFactory,项目名称:tinyshop8,代码行数:11,代码来源:GoodsType8JPA.java

示例5: getChildrenSet

import javax.persistence.ForeignKey; //导入依赖的package包/类
@OneToMany(targetEntity = GoodsType8JPA.class, cascade = ALL,
          fetch = EAGER)
@JoinColumn(name = "join_goods_children_m2o", foreignKey =
@ForeignKey(name = "fk_goods_children_m2o"))
@JoinTable(name = "jpa_goods_children_set", foreignKey =
@ForeignKey(name = "fk_jpa_goods_children_set"))
public Set<GoodsType8JPA> getChildrenSet()
{
    return childrenSet;
}
 
开发者ID:SessionFactory,项目名称:tinyshop8,代码行数:11,代码来源:GoodsType8JPA.java

示例6: getParentType

import javax.persistence.ForeignKey; //导入依赖的package包/类
@ManyToOne(targetEntity = GoodsType8JPA.class, cascade = ALL,
          fetch = EAGER)
@JoinColumn(name = "parent_id", foreignKey =
@ForeignKey(name = "fk_parent"))
public GoodsType8JPA getParentType()
{
    return parentType;
}
 
开发者ID:SessionFactory,项目名称:tinyshop8,代码行数:9,代码来源:GoodsType8JPA.java

示例7: getGoods8JPASet

import javax.persistence.ForeignKey; //导入依赖的package包/类
@OneToMany(targetEntity = Goods8JPA.class, cascade = REMOVE,
          fetch = EAGER)
@JoinColumn(name = "join_goods_brand_m2o", foreignKey =
@ForeignKey(name = "fk_goods_brand_m2o"))
@JoinTable(name = "jpa_goods_brand_set", foreignKey =
@ForeignKey(name = "fk_jpa_goods_brand_set"))
public Set<Goods8JPA> getGoods8JPASet()
{
    return goods8JPASet;
}
 
开发者ID:SessionFactory,项目名称:tinyshop8,代码行数:11,代码来源:GoodsBrand8JPA.java

示例8: getGrupos

import javax.persistence.ForeignKey; //导入依赖的package包/类
@ManyToMany(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
@JoinTable(name = "usuario_grupo", joinColumns = {
		@JoinColumn(name = "usuario_id", foreignKey = @ForeignKey(name = "fk_usuario_grupo_to_usuario")

		) }, inverseJoinColumns = { @JoinColumn(name = "grupo_id", foreignKey = @ForeignKey(name = "fk_usuario_grupo_to_grupo")) })
public Set<Grupo> getGrupos() {
	return grupos;
}
 
开发者ID:marcelothebuilder,项目名称:webpedidos,代码行数:9,代码来源:Usuario.java

示例9: getOwner

import javax.persistence.ForeignKey; //导入依赖的package包/类
@Id
    @org.hibernate.annotations.ForeignKey(name = "fk_assignment_owner")
    @MapsId("owner")
    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinTable(foreignKey = @ForeignKey(name = "fk_assignment_owner"))
    @NotQueryable
    public RObject getOwner() {
        return owner;
    }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:10,代码来源:RAssignment.java

示例10: getExtension

import javax.persistence.ForeignKey; //导入依赖的package包/类
@org.hibernate.annotations.ForeignKey(name = "none")
@com.evolveum.midpoint.repo.sql.query.definition.Any(jaxbNameLocalPart = "extension")
@OneToOne(optional = true, orphanRemoval = true)
@Cascade({org.hibernate.annotations.CascadeType.ALL})
@JoinColumns(value = {
        @JoinColumn(name = "extOid", referencedColumnName = "owner_owner_oid"),
        @JoinColumn(name = "extId", referencedColumnName = "owner_id")
}, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
public RAssignmentExtension getExtension() {
    return extension;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:12,代码来源:RAssignment.java

示例11: getCreateApproverRef

import javax.persistence.ForeignKey; //导入依赖的package包/类
@Where(clause = RAssignmentReference.REFERENCE_TYPE + "= 0")
@OneToMany(mappedBy = RAssignmentReference.F_OWNER, orphanRemoval = true)
@org.hibernate.annotations.ForeignKey(name = "none")
@Cascade({org.hibernate.annotations.CascadeType.ALL})
//@JoinTable(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
@JaxbPath(itemPath = { @JaxbName(localPart = "metadata"), @JaxbName(localPart = "createApproverRef") })
public Set<RAssignmentReference> getCreateApproverRef() {
    if (createApproverRef == null) {
        createApproverRef = new HashSet<>();
    }
    return createApproverRef;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:13,代码来源:RAssignment.java

示例12: getPolicySituation

import javax.persistence.ForeignKey; //导入依赖的package包/类
@ElementCollection
@org.hibernate.annotations.ForeignKey(name = "fk_assignment_policy_situation")
@CollectionTable(name = "m_assignment_policy_situation", joinColumns = {
        @JoinColumn(name = "assignment_oid", referencedColumnName = "owner_oid"),
        @JoinColumn(name = "assignment_id", referencedColumnName = "id")
})
@Cascade({org.hibernate.annotations.CascadeType.ALL})
public Set<String> getPolicySituation() {
    return policySituation;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:RAssignment.java

示例13: getStorage

import javax.persistence.ForeignKey; //导入依赖的package包/类
@NotNull
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumns(value = {
	@JoinColumn(name = "storage_owner_id", referencedColumnName = "owner_id", insertable = false, updatable = false),
	@JoinColumn(name = "storage_name", referencedColumnName = "name", insertable = false, updatable = false)
}, foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "storage_tag_object_statistics_fk_storage"))
public Storage getStorage() {
	return storage;
}
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:10,代码来源:StorageTagObjectStatistics.java

示例14: getBucketObject

import javax.persistence.ForeignKey; //导入依赖的package包/类
@NotNull
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumns(
		foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "bucket_object_version_fk_bucket_object"),
		value = {
	@JoinColumn(name = "bucket_id", referencedColumnName = "bucket_id", insertable = false, updatable = false),
	@JoinColumn(name = "object_name", referencedColumnName = "name", insertable = false, updatable = false)
})
public BucketObject getBucketObject() {
	return bucketObject;
}
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:12,代码来源:BucketObjectVersion.java

示例15: getStorage

import javax.persistence.ForeignKey; //导入依赖的package包/类
@NotNull
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumns(
		foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "bucket_object_version_fk_storage"),
		value = {
	@JoinColumn(name = "storage_owner_id", referencedColumnName = "owner_id"),
	@JoinColumn(name = "storage_name", referencedColumnName = "name")
})
public Storage getStorage() {
	return storage;
}
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:12,代码来源:BucketObjectVersion.java


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