Class AnnotatedJoinColumns
- java.lang.Object
-
- org.hibernate.boot.model.internal.AnnotatedColumns
-
- org.hibernate.boot.model.internal.AnnotatedJoinColumns
-
public class AnnotatedJoinColumns extends AnnotatedColumns
A list ofJoinColumn
s that form a single join condition, similar in concept toJoinColumns
, 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 Constructor Description AnnotatedJoinColumns()
-
Method Summary
-
Methods inherited from class org.hibernate.boot.model.internal.AnnotatedColumns
checkPropertyConsistency, getBuildingContext, getColumns, getJoin, getPropertyHolder, getTable, isSecondary, setBuildingContext, setJoins, setPropertyHolder, setTable
-
-
-
-
Method Detail
-
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
public List<AnnotatedJoinColumn> getJoinColumns()
-
addColumn
public void addColumn(AnnotatedColumn child)
- Overrides:
addColumn
in classAnnotatedColumns
-
addColumn
public void addColumn(AnnotatedJoinColumn child)
-
getMappedBy
public String getMappedBy()
-
setMappedBy
public void setMappedBy(String mappedBy)
-
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
public String getMappedByEntityName()
-
getMappedByPropertyName
public String getMappedByPropertyName()
-
getMappedByTableName
public String getMappedByTableName()
-
isElementCollection
public boolean isElementCollection()
-
setElementCollection
public void setElementCollection(boolean elementCollection)
-
setManyToManyOwnerSideEntityName
public void setManyToManyOwnerSideEntityName(String entityName)
-
getManyToManyOwnerSideEntityName
public String getManyToManyOwnerSideEntityName()
-
setMappedBy
public void setMappedBy(String entityName, String logicalTableName, String mappedByProperty)
-
getReferencedColumnsType
public ForeignKeyType 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.
-
getPropertyName
public String getPropertyName()
A property path relative to thePropertyHolder
.- Overrides:
getPropertyName
in classAnnotatedColumns
-
setPropertyName
public void setPropertyName(String propertyName)
- Overrides:
setPropertyName
in classAnnotatedColumns
-
hasMapsId
public boolean hasMapsId()
-
getMapsId
public String getMapsId()
-
setMapsId
public void setMapsId(String mapsId)
-
-