Java 类javax.persistence.ForeignKey 实例源码

项目:midpoint    文件:RAssignment.java   
@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;
}
项目:tinyshop8    文件:User8JPA.java   
@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;
}
项目:tinyshop8    文件:GoodsType8JPA.java   
@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;
}
项目:tinyshop8    文件:GoodsType8JPA.java   
@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;
}
项目:tinyshop8    文件:GoodsType8JPA.java   
@ManyToOne(targetEntity = GoodsType8JPA.class, cascade = ALL,
          fetch = EAGER)
@JoinColumn(name = "parent_id", foreignKey =
@ForeignKey(name = "fk_parent"))
public GoodsType8JPA getParentType()
{
    return parentType;
}
项目:tinyshop8    文件:GoodsBrand8JPA.java   
@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;
}
项目:webpedidos    文件:Usuario.java   
@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;
}
项目:engerek    文件:RAssignment.java   
@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;
    }
项目:engerek    文件:RAssignment.java   
@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;
}
项目:engerek    文件:RAssignment.java   
@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;
}
项目:engerek    文件:RAssignment.java   
@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;
}
项目:blaze-storage    文件:StorageTagObjectStatistics.java   
@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;
}
项目:blaze-storage    文件:BucketObjectVersion.java   
@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;
}
项目:blaze-storage    文件:BucketObjectVersion.java   
@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;
}
项目:blaze-storage    文件:BucketObjectVersion.java   
@ElementCollection
@CollectionTable(name = "bucket_object_version_tags", 
    foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "bucket_object_version_tags_fk_bucket_object_version"),
    joinColumns = {
        @JoinColumn(name = "bucket_id", referencedColumnName = "bucket_id"),
        @JoinColumn(name = "object_name", referencedColumnName = "object_name"),
        @JoinColumn(name = "version_uuid", referencedColumnName = "version_uuid")
})
@MapKeyColumn(name = "tag", nullable = false)
@Column(name = "value", nullable = false)
public Map<String, String> getTags() {
    return tags;
}
项目:blaze-storage    文件:Account.java   
@ElementCollection
@CollectionTable(name = "account_tags", 
    foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "account_tags_fk_user_account"),
    joinColumns = {
        @JoinColumn(name = "account_id", referencedColumnName = "id")
})
@MapKeyColumn(name = "tag", nullable = false)
@Column(name = "value", nullable = false)
public Map<String, String> getTags() {
    return tags;
}
项目:blaze-storage    文件:BucketObject.java   
@ManyToOne(optional = true, fetch = FetchType.LAZY)
@JoinColumns(
        foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "bucket_object_fk_content_version"),
        value = {
    @JoinColumn(name = "bucket_id", referencedColumnName = "bucket_id", insertable = false, updatable = false),
    @JoinColumn(name = "name", referencedColumnName = "object_name", insertable = false, updatable = false),
    @JoinColumn(name = "content_version_uuid", referencedColumnName = "version_uuid", insertable = false, updatable = false)
})
public BucketObjectVersion getContentVersion() {
    return contentVersion;
}
项目:blaze-storage    文件:Bucket.java   
@NotNull
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumns(
        foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "bucket_fk_storage"),
        value = {
    @JoinColumn(name = "storage_owner", referencedColumnName = "owner_id"),
    @JoinColumn(name = "storage_name", referencedColumnName = "name")
})
public Storage getStorage() {
    return storage;
}
项目:blaze-storage    文件:Storage.java   
@NotNull
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumns(value = {
        @JoinColumn(name = "quota_plan_id", referencedColumnName = "quota_model_id"), 
        @JoinColumn(name = "quota_plan_limit", referencedColumnName = "gigabyte_limit")
    }, foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "storage_fk_quota_plan"))
public StorageQuotaPlan getQuotaPlan() {
    return quotaPlan;
}
项目:blaze-storage    文件:Storage.java   
@ElementCollection
@CollectionTable(name = "storage_tags", 
    foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "storage_tags_fk_storage"),
    joinColumns = {
        @JoinColumn(name = "owner_id", referencedColumnName = "owner_id"),
        @JoinColumn(name = "storage_name", referencedColumnName = "name")
})
@MapKeyColumn(name = "tag", nullable = false)
@Column(name = "value", nullable = false)
public Map<String, String> getTags() {
    return tags;
}
项目:scheduling    文件:TaskData.java   
@Cascade(org.hibernate.annotations.CascadeType.ALL)
@OneToOne(fetch = FetchType.LAZY)
// disable foreign key, to be able to remove runtime data
@JoinColumn(name = "ENV_SCRIPT_ID", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
public ScriptData getEnvScript() {
    return envScript;
}
项目:scheduling    文件:TaskData.java   
@Cascade(org.hibernate.annotations.CascadeType.ALL)
@OneToOne(fetch = FetchType.LAZY)
// disable foreign key, to be able to remove runtime data
@JoinColumn(name = "SCRIPT_ID", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
public ScriptData getScript() {
    return script;
}
项目:scheduling    文件:TaskData.java   
@Cascade(CascadeType.ALL)
@OneToOne(fetch = FetchType.LAZY)
// disable foreign key, to be able to remove runtime data
@JoinColumn(name = "PRE_SCRIPT_ID", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
public ScriptData getPreScript() {
    return preScript;
}
项目:scheduling    文件:TaskData.java   
@Cascade(CascadeType.ALL)
@OneToOne(fetch = FetchType.LAZY)
// disable foreign key, to be able to remove runtime data
@JoinColumn(name = "POST_SCRIPT_ID", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
public ScriptData getPostScript() {
    return postScript;
}
项目:scheduling    文件:TaskData.java   
@Cascade(CascadeType.ALL)
@OneToOne(fetch = FetchType.LAZY)
// disable foreign key, to be able to remove runtime data
@JoinColumn(name = "CLEAN_SCRIPT_ID", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
public ScriptData getCleanScript() {
    return cleanScript;
}
项目:scheduling    文件:TaskData.java   
@Cascade(CascadeType.ALL)
@OneToOne(fetch = FetchType.LAZY)
// disable foreign key, to be able to remove runtime data
@JoinColumn(name = "FLOW_SCRIPT_ID", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
public ScriptData getFlowScript() {
    return flowScript;
}
项目:midpoint    文件:RAssignment.java   
@Id
@JoinColumn(foreignKey = @ForeignKey(name = "fk_assignment_owner"))
@MapsId("owner")
@ManyToOne(fetch = FetchType.LAZY)
@NotQueryable
public RObject getOwner() {
    return owner;
}
项目:midpoint    文件:RAssignment.java   
@ElementCollection
@CollectionTable(name = "m_assignment_policy_situation",
        foreignKey = @ForeignKey(name = "fk_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;
}
项目:midpoint    文件:RAssignment.java   
@Id
@JoinColumn(foreignKey = @ForeignKey(name = "fk_assignment_owner"))
@MapsId("owner")
@ManyToOne(fetch = FetchType.LAZY)
@NotQueryable
public RObject getOwner() {
    return owner;
}
项目:midpoint    文件:RAssignment.java   
@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;
}
项目:midpoint    文件:RAssignment.java   
@ElementCollection
@CollectionTable(name = "m_assignment_policy_situation",
        foreignKey = @ForeignKey(name = "fk_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;
}
项目:lams    文件:MapKeyJoinColumnDelegator.java   
@Override
public ForeignKey foreignKey() {
    return column.foreignKey();
}
项目:webpedidos    文件:Endereco.java   
@NotNull
@ManyToOne(cascade = CascadeType.PERSIST, optional = false)
@JoinColumn(foreignKey = @ForeignKey(name = "fk_endereco_to_cidade"))
public Cidade getCidade() {
    return cidade;
}
项目:webpedidos    文件:Endereco.java   
@ManyToOne(optional = false)
@JoinColumn(foreignKey = @ForeignKey(name = "fk_endereco_to_cliente"))
public Cliente getCliente() {
    return cliente;
}