Class AnnotatedJoinColumn
- java.lang.Object
-
- org.hibernate.boot.model.internal.AnnotatedColumn
-
- org.hibernate.boot.model.internal.AnnotatedJoinColumn
-
public class AnnotatedJoinColumn extends AnnotatedColumn
An element of a join condition, logically representing aJoinColumn
annotation, but not every instance 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
Column
.
-
-
Field Summary
-
Fields inherited from class org.hibernate.boot.model.internal.AnnotatedColumn
sqlType
-
-
Method Summary
-
Methods inherited from class org.hibernate.boot.model.internal.AnnotatedColumn
addCheckConstraint, addIndex, bind, buildColumnFromAnnotation, buildColumnFromNoAnnotation, buildColumnOrFormulaFromAnnotation, buildColumnsFromAnnotations, buildColumnsFromAnnotations, buildColumnsOrFormulaFromAnnotation, buildFormulaFromAnnotation, forceNotNull, getArrayLength, getDefaultValue, getExplicitTableName, getGeneratedAs, getLength, getLogicalColumnName, getMappingColumn, getName, getPrecision, getScale, getSqlType, initMappingColumn, isFormula, isImplicit, isInsertable, isNameDeferred, isNullable, isUnique, isUpdatable, linkWithAggregateValue, linkWithValue, setArrayLength, setDefaultValue, setExplicitTableName, setFormula, setImplicit, setInsertable, setLength, setLogicalColumnName, setMappingColumn, setNullable, setPrecision, setScale, setSqlType, setTemporalPrecision, setUnique, setUpdatable
-
-
-
-
Method Detail
-
setReferencedColumn
public void setReferencedColumn(String referencedColumn)
-
getReferencedColumn
public String getReferencedColumn()
ThereferencedColumnName
.
-
isReferenceImplicit
public boolean isReferenceImplicit()
- Returns:
- true if the
@JoinColumn
annotation did not specify thereferencedColumnName
.
-
buildJoinFormula
public static AnnotatedJoinColumn buildJoinFormula(JoinFormula joinFormula, AnnotatedJoinColumns parent)
-
applyJoinAnnotation
public void applyJoinAnnotation(JoinColumn joinColumn, String defaultName)
-
buildInheritanceJoinColumn
public static AnnotatedJoinColumn buildInheritanceJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn, JoinColumn joinColumn, Value identifier, AnnotatedJoinColumns parent, MetadataBuildingContext context)
Called forInheritanceType.JOINED
entities.
-
checkIfJoinColumn
public static void checkIfJoinColumn(Object columns, PropertyHolder holder, PropertyData property)
-
copyReferencedStructureAndCreateDefaultJoinColumns
public void copyReferencedStructureAndCreateDefaultJoinColumns(PersistentClass referencedEntity, SimpleValue referencedValue, SimpleValue value)
-
linkValueUsingDefaultColumnNaming
public void linkValueUsingDefaultColumnNaming(Column referencedColumn, PersistentClass referencedEntity, SimpleValue value)
-
linkValueUsingDefaultColumnNaming
public void linkValueUsingDefaultColumnNaming(int columnIndex, Column referencedColumn, PersistentClass referencedEntity, SimpleValue value)
-
addDefaultJoinColumnName
public void addDefaultJoinColumnName(PersistentClass referencedEntity, String logicalReferencedColumn)
-
linkValueUsingAColumnCopy
public void linkValueUsingAColumnCopy(Column column, SimpleValue value)
used for mappedBy cases
-
addColumnBinding
protected void addColumnBinding(SimpleValue value)
- Overrides:
addColumnBinding
in classAnnotatedColumn
-
overrideFromReferencedColumnIfNecessary
public void overrideFromReferencedColumnIfNecessary(Column column)
Called to apply column definitions from the referenced FK column to this column.- Parameters:
column
- the referenced column.
-
redefineColumnName
public void redefineColumnName(String columnName, String propertyName, boolean applyNamingStrategy)
- Overrides:
redefineColumnName
in classAnnotatedColumn
-
toString
public String toString()
- Overrides:
toString
in classAnnotatedColumn
-
getParent
public AnnotatedJoinColumns getParent()
- Overrides:
getParent
in classAnnotatedColumn
-
setParent
public void setParent(AnnotatedColumns parent)
- Overrides:
setParent
in classAnnotatedColumn
-
setParent
public void setParent(AnnotatedJoinColumns parent)
-
-