Class AnnotatedJoinColumns
java.lang.Object
org.hibernate.boot.model.internal.AnnotatedColumns
org.hibernate.boot.model.internal.AnnotatedJoinColumns
A list of
JoinColumn
s that form a single join
condition, similar in concept to JoinColumns
,
but not every instance of this class corresponds to an explicit annotation
in the Java code.
There's no exact analog of this class in the mapping model, so some
information is lost when it's transformed into a list of Column
s.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(AnnotatedColumn child) void
addColumn
(AnnotatedJoinColumn child) static AnnotatedJoinColumns
buildJoinColumns
(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext buildingContext) static AnnotatedJoinColumns
buildJoinColumnsOrFormulas
(JoinColumnOrFormula[] joinColumnOrFormulas, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext context) static AnnotatedJoinColumns
buildJoinColumnsWithDefaultColumnSuffix
(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, String defaultColumnSuffix, MetadataBuildingContext context) static AnnotatedJoinColumns
buildJoinTableJoinColumns
(JoinColumn[] joinColumns, Map<String, Join> secondaryTables, PropertyHolder propertyHolder, PropertyData inferredData, String mappedBy, MetadataBuildingContext context) Called for join tables inManyToMany
associations.getReferencedColumnsType
(PersistentClass referencedEntity) Determine if the givenAnnotatedJoinColumns
represent a reference to the primary key of the givenPersistentClass
, or whether they reference some other combination of mapped columns.boolean
boolean
boolean
void
setElementCollection
(boolean elementCollection) void
setManyToManyOwnerSideEntityName
(String entityName) void
setMappedBy
(String mappedBy) void
setMappedBy
(String entityName, String logicalTableName, String mappedByProperty) void
Methods inherited from class org.hibernate.boot.model.internal.AnnotatedColumns
checkPropertyConsistency, getBuildingContext, getColumns, getJoin, getPropertyHolder, getPropertyName, getTable, isSecondary, setBuildingContext, setJoins, setPropertyHolder, setPropertyName, setTable
-
Constructor Details
-
AnnotatedJoinColumns
public AnnotatedJoinColumns()
-
-
Method Details
-
buildJoinColumnsOrFormulas
public static AnnotatedJoinColumns buildJoinColumnsOrFormulas(JoinColumnOrFormula[] joinColumnOrFormulas, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext context) -
buildJoinColumns
public static AnnotatedJoinColumns buildJoinColumns(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext buildingContext) -
buildJoinColumnsWithDefaultColumnSuffix
public static AnnotatedJoinColumns buildJoinColumnsWithDefaultColumnSuffix(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, String defaultColumnSuffix, MetadataBuildingContext context) -
buildJoinTableJoinColumns
public static AnnotatedJoinColumns buildJoinTableJoinColumns(JoinColumn[] joinColumns, Map<String, Join> secondaryTables, PropertyHolder propertyHolder, PropertyData inferredData, String mappedBy, MetadataBuildingContext context) Called for join tables inManyToMany
associations. -
getJoinColumns
-
addColumn
- Overrides:
addColumn
in classAnnotatedColumns
-
addColumn
-
getReferencedProperty
-
getMappedBy
-
setMappedBy
-
hasMappedBy
public boolean hasMappedBy()- Returns:
- true if the association mapping annotation did specify
mappedBy
, meaning that this@JoinColumn
mapping belongs to an unowned many-valued association.
-
getMappedByEntityName
-
getMappedByPropertyName
-
getMappedByTableName
-
isElementCollection
public boolean isElementCollection() -
setElementCollection
public void setElementCollection(boolean elementCollection) -
setManyToManyOwnerSideEntityName
-
getManyToManyOwnerSideEntityName
-
setMappedBy
-
getReferencedColumnsType
Determine if the givenAnnotatedJoinColumns
represent a reference to the primary key of the givenPersistentClass
, or whether they reference some other combination of mapped columns. -
hasMapsId
public boolean hasMapsId() -
getMapsId
-
setMapsId
-