Top Description Inners Fields Constructors Methods
org.hibernate.boot.model.internal

public Class AnnotatedJoinColumns

extends AnnotatedColumns
Class Inheritance
Imports
java.util.ArrayList, .List, .Locale, .Map, org.hibernate.AnnotationException, .AssertionFailure, .MappingException, org.hibernate.annotations.JoinColumnOrFormula, .JoinFormula, org.hibernate.boot.model.naming.EntityNaming, .Identifier, .ImplicitJoinColumnNameSource, .ImplicitNamingStrategy, .ImplicitPrimaryKeyJoinColumnNameSource, .PhysicalNamingStrategy, org.hibernate.boot.model.relational.Database, org.hibernate.boot.model.source.spi.AttributePath, org.hibernate.boot.spi.InFlightMetadataCollector, .MetadataBuildingContext, .MetadataBuildingOptions, .PropertyData, org.hibernate.cfg.RecoverableException, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment, org.hibernate.mapping.Column, .Component, .Join, .KeyValue, .PersistentClass, .Property, .Selectable, .SimpleValue, .Table, jakarta.persistence.JoinColumn

A list of jakarta.persistence.JoinColumns that form a single join condition, similar in concept to jakarta.persistence.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 Columns.

Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private final List<AnnotatedJoinColumn>
private boolean
private String
private String
private String
private String
private String
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
pack-priv String
buildDefaultColumnName(PersistentClass referencedEntity, String logicalReferencedColumn)

public static AnnotatedJoinColumns
buildJoinColumns(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext buildingContext)

public static AnnotatedJoinColumns
buildJoinColumnsOrFormulas(JoinColumnOrFormula[] joinColumnOrFormulas, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext context)

public static AnnotatedJoinColumns
buildJoinColumnsWithDefaultColumnSuffix(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, String defaultColumnSuffix, MetadataBuildingContext context)

pack-priv static AnnotatedJoinColumns
buildJoinColumnsWithFormula(JoinFormula joinFormula, Map<String, Join> secondaryTables, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext context)

public static AnnotatedJoinColumns
buildJoinTableJoinColumns(JoinColumn[] joinColumns, Map<String, Join> secondaryTables, PropertyHolder propertyHolder, PropertyData inferredData, String mappedBy, MetadataBuildingContext context)

Called for join tables in jakarta.persistence.ManyToMany associations.

private static Column
column(MetadataBuildingContext context, Table table, String logicalReferencedColumnName)

private Identifier
columnIdentifier(PersistentClass referencedEntity, String logicalReferencedColumn, ImplicitNamingStrategy implicitNamingStrategy, InFlightMetadataCollector collector, Database database)

Deprecated as a consequence of InFlightMetadataCollector being deprecated.
private ImplicitJoinColumnNameSource.Nature
public List<AnnotatedJoinColumn>
public String
public String
public String
public String
public String
public String
public String
public ForeignKeyType
getReferencedColumnsType(PersistentClass referencedEntity)

Determine if the given AnnotatedJoinColumns represent a reference to the primary key of the given PersistentClass, or whether they reference some other combination of mapped columns.

public boolean

Returns:

true if the association mapping annotation did specify mappedBy, meaning that this @JoinColumn mapping belongs to an unowned many-valued association.
hasMappedBy
()

public boolean
public boolean
private boolean
private boolean
private static Identifier
quoteIfNecessary(boolean isRefColumnQuoted, Identifier logicalTableName, Identifier columnIdentifier)

private static Identifier
quoteIfNecessary(boolean isRefColumnQuoted, String logicalTableName, Identifier columnIdentifier)

pack-priv Property
public void
setElementCollection(boolean elementCollection)

public void
public void
setMappedBy(String mappedBy)

public void
setMappedBy(String entityName, String logicalTableName, String mappedByProperty)

public void
setMapsId(String mapsId)

public void
private static Table
table(Object persistentClassOrJoin)

Inherited from org.hibernate.boot.model.internal.AnnotatedColumns:
checkPropertyConsistencygetBuildingContextgetColumnsgetJoingetPropertyHoldergetTableisSecondarysetBuildingContextsetJoinssetPropertyHoldersetTablesetTableInternal

Field Detail

columnsback to summary
private final List<AnnotatedJoinColumn> columns

Hides org.hibernate.boot.model.internal.AnnotatedColumns.columns.

elementCollectionback to summary
private boolean elementCollection
manyToManyOwnerSideEntityNameback to summary
private String manyToManyOwnerSideEntityName
mappedByback to summary
private String mappedBy
mappedByEntityNameback to summary
private String mappedByEntityName
mappedByPropertyNameback to summary
private String mappedByPropertyName
mappedByTableNameback to summary
private String mappedByTableName
mapsIdback to summary
private String mapsId
propertyNameback to summary
private String propertyName

Hides org.hibernate.boot.model.internal.AnnotatedColumns.propertyName.

Constructor Detail

AnnotatedJoinColumnsback to summary
public AnnotatedJoinColumns()

Method Detail

addColumnback to summary
public void addColumn(AnnotatedColumn child)

Overrides org.hibernate.boot.model.internal.AnnotatedColumns.addColumn.

Annotations
@Override
addColumnback to summary
public void addColumn(AnnotatedJoinColumn child)
buildDefaultColumnNameback to summary
pack-priv String buildDefaultColumnName(PersistentClass referencedEntity, String logicalReferencedColumn)
buildJoinColumnsback to summary
public static AnnotatedJoinColumns buildJoinColumns(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext buildingContext)
buildJoinColumnsOrFormulasback to summary
public static AnnotatedJoinColumns buildJoinColumnsOrFormulas(JoinColumnOrFormula[] joinColumnOrFormulas, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext context)
buildJoinColumnsWithDefaultColumnSuffixback to summary
public static AnnotatedJoinColumns buildJoinColumnsWithDefaultColumnSuffix(JoinColumn[] joinColumns, String mappedBy, Map<String, Join> joins, PropertyHolder propertyHolder, PropertyData inferredData, String defaultColumnSuffix, MetadataBuildingContext context)
buildJoinColumnsWithFormulaback to summary
pack-priv static AnnotatedJoinColumns buildJoinColumnsWithFormula(JoinFormula joinFormula, Map<String, Join> secondaryTables, PropertyHolder propertyHolder, PropertyData inferredData, MetadataBuildingContext context)
buildJoinTableJoinColumnsback to summary
public static AnnotatedJoinColumns buildJoinTableJoinColumns(JoinColumn[] joinColumns, Map<String, Join> secondaryTables, PropertyHolder propertyHolder, PropertyData inferredData, String mappedBy, MetadataBuildingContext context)

Called for join tables in jakarta.persistence.ManyToMany associations.

columnback to summary
private static Column column(MetadataBuildingContext context, Table table, String logicalReferencedColumnName)
columnIdentifierback to summary
private Identifier columnIdentifier(PersistentClass referencedEntity, String logicalReferencedColumn, ImplicitNamingStrategy implicitNamingStrategy, InFlightMetadataCollector collector, Database database)

Deprecated

as a consequence of InFlightMetadataCollector being deprecated. See corresponding docs for further information.

getImplicitNatureback to summary
private ImplicitJoinColumnNameSource.Nature getImplicitNature()
getJoinColumnsback to summary
public List<AnnotatedJoinColumn> getJoinColumns()
getManyToManyOwnerSideEntityNameback to summary
public String getManyToManyOwnerSideEntityName()
getMappedByback to summary
public String getMappedBy()
getMappedByEntityNameback to summary
public String getMappedByEntityName()
getMappedByPropertyNameback to summary
public String getMappedByPropertyName()
getMappedByTableNameback to summary
public String getMappedByTableName()
getMapsIdback to summary
public String getMapsId()
getPropertyNameback to summary
public String getPropertyName()

Overrides org.hibernate.boot.model.internal.AnnotatedColumns.getPropertyName.

A property path relative to the PropertyHolder.

Annotations
@Override
getReferencedColumnsTypeback to summary
public ForeignKeyType getReferencedColumnsType(PersistentClass referencedEntity)

Determine if the given AnnotatedJoinColumns represent a reference to the primary key of the given PersistentClass, or whether they reference some other combination of mapped columns.

hasMappedByback to summary
public boolean hasMappedBy()
Returns:boolean

true if the association mapping annotation did specify mappedBy, meaning that this @JoinColumn mapping belongs to an unowned many-valued association.

hasMapsIdback to summary
public boolean hasMapsId()
isElementCollectionback to summary
public boolean isElementCollection()
isMappedBySideback to summary
private boolean isMappedBySide()
isOwnerSideback to summary
private boolean isOwnerSide()
quoteIfNecessaryback to summary
private static Identifier quoteIfNecessary(boolean isRefColumnQuoted, Identifier logicalTableName, Identifier columnIdentifier)
quoteIfNecessaryback to summary
private static Identifier quoteIfNecessary(boolean isRefColumnQuoted, String logicalTableName, Identifier columnIdentifier)
resolveMapsIdback to summary
pack-priv Property resolveMapsId()
setElementCollectionback to summary
public void setElementCollection(boolean elementCollection)
setManyToManyOwnerSideEntityNameback to summary
public void setManyToManyOwnerSideEntityName(String entityName)
setMappedByback to summary
public void setMappedBy(String mappedBy)
setMappedByback to summary
public void setMappedBy(String entityName, String logicalTableName, String mappedByProperty)
setMapsIdback to summary
public void setMapsId(String mapsId)
setPropertyNameback to summary
public void setPropertyName(String propertyName)

Overrides org.hibernate.boot.model.internal.AnnotatedColumns.setPropertyName.

Annotations
@Override
tableback to summary
private static Table table(Object persistentClassOrJoin)
org.hibernate.boot.model.internal back to summary

private Class AnnotatedJoinColumns.OwnedImplicitJoinColumnNameSource

extends Object
implements ImplicitJoinColumnNameSource
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.model.internal.AnnotatedJoinColumns.OwnedImplicitJoinColumnNameSource
All Implemented Interfaces
org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource, org.hibernate.boot.model.naming.ImplicitNameSource

Field Summary

Modifier and TypeField and Description
private final AttributePath
pack-priv final InFlightMetadataCollector
collector

Deprecated as a consequence of InFlightMetadataCollector being deprecated.
pack-priv final Database
private final EntityNaming
pack-priv final ImplicitJoinColumnNameSource.Nature
private final Identifier
private final Identifier

Constructor Summary

AccessConstructor and Description
public
OwnedImplicitJoinColumnNameSource(PersistentClass referencedEntity, String logicalTableName, String logicalReferencedColumn)

Method Summary

Modifier and TypeMethod and Description
public AttributePath
getAttributePath()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getAttributePath.

Access to the name of the attribute that defines the association.
public MetadataBuildingContext
public EntityNaming
public ImplicitJoinColumnNameSource.Nature
public Identifier
getReferencedColumnName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedColumnName.

Access the name of the column that is the target of the FK being described
public Identifier
getReferencedTableName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedTableName.

Access the name of the table that is the target of the FK being described
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributePathback to summary
private final AttributePath attributePath
collectorback to summary
pack-priv final InFlightMetadataCollector collector

Deprecated

as a consequence of InFlightMetadataCollector being deprecated. See corresponding docs for further information.

databaseback to summary
pack-priv final Database database
entityNamingback to summary
private final EntityNaming entityNaming
implicitNamingNatureback to summary
pack-priv final ImplicitJoinColumnNameSource.Nature implicitNamingNature
referencedColumnNameback to summary
private final Identifier referencedColumnName
referencedTableNameback to summary
private final Identifier referencedTableName

Constructor Detail

OwnedImplicitJoinColumnNameSourceback to summary
public OwnedImplicitJoinColumnNameSource(PersistentClass referencedEntity, String logicalTableName, String logicalReferencedColumn)

Method Detail

getAttributePathback to summary
public AttributePath getAttributePath()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getAttributePath.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getAttributePath.

Access to the name of the attribute that defines the association. For "normal" join columns, this will be the attribute where the association is defined. For "inverse" join columns, this will be the "mapped-by" attribute.

Returns:AttributePath

The owning side's attribute name.

Annotations
@Override
getBuildingContextback to summary
public MetadataBuildingContext getBuildingContext()

Implements org.hibernate.boot.model.naming.ImplicitNameSource.getBuildingContext.

Doc from org.hibernate.boot.model.naming.ImplicitNameSource.getBuildingContext.

Access to the current building context.

Returns:MetadataBuildingContext

The building context

Annotations
@Override
getEntityNamingback to summary
public EntityNaming getEntityNaming()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getEntityNaming.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getEntityNaming.

Access to entity naming information. For "normal" join columns, this will be the entity where the association is defined. For "inverse" join columns, this will be the target entity.

Returns:EntityNaming

Owning entity naming information

Annotations
@Override
getNatureback to summary
public ImplicitJoinColumnNameSource.Nature getNature()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getNature.

Annotations
@Override
getReferencedColumnNameback to summary
public Identifier getReferencedColumnName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedColumnName.

Access the name of the column that is the target of the FK being described

Returns:Identifier

The referenced column name

Annotations
@Override
getReferencedTableNameback to summary
public Identifier getReferencedTableName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedTableName.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedTableName.

Access the name of the table that is the target of the FK being described

Returns:Identifier

The referenced table name

Annotations
@Override
org.hibernate.boot.model.internal back to summary

private Class AnnotatedJoinColumns.UnownedImplicitJoinColumnNameSource

extends Object
implements ImplicitJoinColumnNameSource
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.model.internal.AnnotatedJoinColumns.UnownedImplicitJoinColumnNameSource
All Implemented Interfaces
org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource, org.hibernate.boot.model.naming.ImplicitNameSource

Field Summary

Modifier and TypeField and Description
pack-priv final AttributePath
pack-priv final InFlightMetadataCollector
collector

Deprecated as a consequence of InFlightMetadataCollector being deprecated.
pack-priv final Database
private final EntityNaming
pack-priv final ImplicitJoinColumnNameSource.Nature
private final String
private final Identifier

Constructor Summary

AccessConstructor and Description
public
UnownedImplicitJoinColumnNameSource(PersistentClass referencedEntity, String logicalReferencedColumn)

Method Summary

Modifier and TypeMethod and Description
public AttributePath
getAttributePath()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getAttributePath.

Access to the name of the attribute that defines the association.
public MetadataBuildingContext
public EntityNaming
public ImplicitJoinColumnNameSource.Nature
public Identifier
getReferencedColumnName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedColumnName.

Access the name of the column that is the target of the FK being described
public Identifier
getReferencedTableName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedTableName.

Access the name of the table that is the target of the FK being described
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributePathback to summary
pack-priv final AttributePath attributePath
collectorback to summary
pack-priv final InFlightMetadataCollector collector

Deprecated

as a consequence of InFlightMetadataCollector being deprecated. See corresponding docs for further information.

databaseback to summary
pack-priv final Database database
entityNamingback to summary
private final EntityNaming entityNaming
implicitNamingNatureback to summary
pack-priv final ImplicitJoinColumnNameSource.Nature implicitNamingNature
logicalReferencedColumnback to summary
private final String logicalReferencedColumn
referencedTableNameback to summary
private final Identifier referencedTableName

Constructor Detail

UnownedImplicitJoinColumnNameSourceback to summary
public UnownedImplicitJoinColumnNameSource(PersistentClass referencedEntity, String logicalReferencedColumn)

Method Detail

getAttributePathback to summary
public AttributePath getAttributePath()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getAttributePath.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getAttributePath.

Access to the name of the attribute that defines the association. For "normal" join columns, this will be the attribute where the association is defined. For "inverse" join columns, this will be the "mapped-by" attribute.

Returns:AttributePath

The owning side's attribute name.

Annotations
@Override
getBuildingContextback to summary
public MetadataBuildingContext getBuildingContext()

Implements org.hibernate.boot.model.naming.ImplicitNameSource.getBuildingContext.

Doc from org.hibernate.boot.model.naming.ImplicitNameSource.getBuildingContext.

Access to the current building context.

Returns:MetadataBuildingContext

The building context

Annotations
@Override
getEntityNamingback to summary
public EntityNaming getEntityNaming()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getEntityNaming.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getEntityNaming.

Access to entity naming information. For "normal" join columns, this will be the entity where the association is defined. For "inverse" join columns, this will be the target entity.

Returns:EntityNaming

Owning entity naming information

Annotations
@Override
getNatureback to summary
public ImplicitJoinColumnNameSource.Nature getNature()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getNature.

Annotations
@Override
getReferencedColumnNameback to summary
public Identifier getReferencedColumnName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedColumnName.

Access the name of the column that is the target of the FK being described

Returns:Identifier

The referenced column name

Annotations
@Override
getReferencedTableNameback to summary
public Identifier getReferencedTableName()

Implements org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedTableName.

Doc from org.hibernate.boot.model.naming.ImplicitJoinColumnNameSource.getReferencedTableName.

Access the name of the table that is the target of the FK being described

Returns:Identifier

The referenced table name

Annotations
@Override