本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}