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

public Class TableBinder

extends Object
Class Inheritance
Imports
java.util.List, org.hibernate.AnnotationException, .AssertionFailure, .MappingException, org.hibernate.boot.model.naming.EntityNaming, .Identifier, .ImplicitCollectionTableNameSource, .ImplicitJoinTableNameSource, .ImplicitNamingStrategy, .NamingStrategyHelper, org.hibernate.boot.model.source.spi.AttributePath, org.hibernate.boot.spi.InFlightMetadataCollector, .MetadataBuildingContext, org.hibernate.dialect.Dialect, org.hibernate.internal.CoreMessageLogger, org.hibernate.mapping.Collection, .Column, .Component, .DependantValue, .Join, .JoinedSubclass, .KeyValue, .PersistentClass, .Property, .SimpleValue, .SortableValue, .Table, .ToOne, .Value, org.jboss.logging.Logger, jakarta.persistence.Index, .UniqueConstraint

Stateful binder responsible for producing instances of Table.
Author
Emmanuel Bernard

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private String
private MetadataBuildingContext
private String
private Index[]
private boolean
private boolean
private static final CoreMessageLogger
private String
private String
private String
private String
private String
private String
private String
private UniqueConstraint[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
addIndexes(Table table, Index[] indexes, MetadataBuildingContext context)

Deprecated as a consequence of Index being deprecated.
private static Table
addTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, MetadataBuildingContext buildingContext, String subselect, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref, InFlightMetadataCollector metadataCollector)

Deprecated as a consequence of InFlightMetadataCollector being deprecated.
public Table
bind()

private static void
bindExplicitColumns(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, MetadataBuildingContext buildingContext, PersistentClass associatedClass)

public static void
bindForeignKey(PersistentClass referencedEntity, PersistentClass destinationEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, boolean unique, MetadataBuildingContext buildingContext)

private static void
private static void
private static void
private static void
bindPrimaryKeyReference(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, PersistentClass associatedClass, MetadataBuildingContext buildingContext)

private static void
bindUnownedAssociation(AnnotatedJoinColumns joinColumns, SimpleValue value, PersistentClass associatedClass, String mappedByProperty)

public static Table
buildAndFillTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, UniqueConstraint[] uniqueConstraints, MetadataBuildingContext buildingContext)

public static Table
buildAndFillTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, UniqueConstraint[] uniqueConstraints, MetadataBuildingContext buildingContext, String subselect, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref)

private static Table
buildAndFillTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, UniqueConstraint[] uniqueConstraints, Index[] indexes, MetadataBuildingContext buildingContext, String subselect, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref)

private ObjectNameSource
public String
public static void
private static List<Column>
mappedByColumns(PersistentClass associatedClass, String mappedByProperty)

private static boolean
matchUpJoinColumnsWithKeyColumns(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, InFlightMetadataCollector metadataCollector, Dialect dialect, int index)

Deprecated as a consequence of InFlightMetadataCollector being deprecated.
public void
setAbstract(boolean anAbstract)

public void
public void
setCatalog(String catalog)

public void
setDefaultName(String ownerClassName, String ownerEntity, String ownerJpaEntity, String ownerEntityTable, String associatedClassName, String associatedEntity, String associatedJpaEntity, String associatedEntityTable, String propertyName)

public void
setJPA2ElementCollection(boolean isJPA2ElementCollection)

public void
setJpaIndex(Index[] indexes)

public void
public void
setSchema(String schema)

public void
private Identifier
toIdentifier(String tableName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

associatedClassNameback to summary
private String associatedClassName
associatedEntityback to summary
private String associatedEntity
associatedEntityTableback to summary
private String associatedEntityTable
associatedJpaEntityback to summary
private String associatedJpaEntity
buildingContextback to summary
private MetadataBuildingContext buildingContext
catalogback to summary
private String catalog
indexesback to summary
private Index[] indexes
isAbstractback to summary
private boolean isAbstract
isJPA2ElementCollectionback to summary
private boolean isJPA2ElementCollection
LOGback to summary
private static final CoreMessageLogger LOG
nameback to summary
private String name
ownerClassNameback to summary
private String ownerClassName
ownerEntityback to summary
private String ownerEntity
ownerEntityTableback to summary
private String ownerEntityTable
ownerJpaEntityback to summary
private String ownerJpaEntity
propertyNameback to summary
private String propertyName
schemaback to summary
private String schema
uniqueConstraintsback to summary
private UniqueConstraint[] uniqueConstraints

Constructor Detail

TableBinderback to summary
public TableBinder()

Method Detail

addIndexesback to summary
pack-priv static void addIndexes(Table table, Index[] indexes, MetadataBuildingContext context)

Deprecated

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

addTableback to summary
private static Table addTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, MetadataBuildingContext buildingContext, String subselect, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref, InFlightMetadataCollector metadataCollector)

Deprecated

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

bindback to summary
public Table bind()
bindExplicitColumnsback to summary
private static void bindExplicitColumns(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, MetadataBuildingContext buildingContext, PersistentClass associatedClass)
bindForeignKeyback to summary
public static void bindForeignKey(PersistentClass referencedEntity, PersistentClass destinationEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, boolean unique, MetadataBuildingContext buildingContext)
bindImplicitColumnsback to summary
private static void bindImplicitColumns(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value)
bindImplicitPrimaryKeyReferenceback to summary
private static void bindImplicitPrimaryKeyReference(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, PersistentClass associatedClass)
bindNonPrimaryKeyReferenceback to summary
private static void bindNonPrimaryKeyReference(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value)
bindPrimaryKeyReferenceback to summary
private static void bindPrimaryKeyReference(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, PersistentClass associatedClass, MetadataBuildingContext buildingContext)
bindUnownedAssociationback to summary
private static void bindUnownedAssociation(AnnotatedJoinColumns joinColumns, SimpleValue value, PersistentClass associatedClass, String mappedByProperty)
buildAndFillTableback to summary
public static Table buildAndFillTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, UniqueConstraint[] uniqueConstraints, MetadataBuildingContext buildingContext)
buildAndFillTableback to summary
public static Table buildAndFillTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, UniqueConstraint[] uniqueConstraints, MetadataBuildingContext buildingContext, String subselect, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref)
buildAndFillTableback to summary
private static Table buildAndFillTable(String schema, String catalog, Identifier logicalName, boolean isAbstract, UniqueConstraint[] uniqueConstraints, Index[] indexes, MetadataBuildingContext buildingContext, String subselect, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref)
buildNameContextback to summary
private ObjectNameSource buildNameContext()
getNameback to summary
public String getName()
linkJoinColumnWithValueOverridingNameIfImplicitback to summary
public static void linkJoinColumnWithValueOverridingNameIfImplicit(PersistentClass referencedEntity, Value value, AnnotatedJoinColumns joinColumns, SimpleValue simpleValue)
mappedByColumnsback to summary
private static List<Column> mappedByColumns(PersistentClass associatedClass, String mappedByProperty)
matchUpJoinColumnsWithKeyColumnsback to summary
private static boolean matchUpJoinColumnsWithKeyColumns(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, InFlightMetadataCollector metadataCollector, Dialect dialect, int index)

Deprecated

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

setAbstractback to summary
public void setAbstract(boolean anAbstract)
setBuildingContextback to summary
public void setBuildingContext(MetadataBuildingContext buildingContext)
setCatalogback to summary
public void setCatalog(String catalog)
setDefaultNameback to summary
public void setDefaultName(String ownerClassName, String ownerEntity, String ownerJpaEntity, String ownerEntityTable, String associatedClassName, String associatedEntity, String associatedJpaEntity, String associatedEntityTable, String propertyName)
setJPA2ElementCollectionback to summary
public void setJPA2ElementCollection(boolean isJPA2ElementCollection)
setJpaIndexback to summary
public void setJpaIndex(Index[] indexes)
setNameback to summary
public void setName(String name)
setSchemaback to summary
public void setSchema(String schema)
setUniqueConstraintsback to summary
public void setUniqueConstraints(UniqueConstraint[] uniqueConstraints)
toIdentifierback to summary
private Identifier toIdentifier(String tableName)
org.hibernate.boot.model.internal back to summary

private Class TableBinder.AssociationTableNameSource

extends Object
implements ObjectNameSource
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.model.internal.TableBinder.AssociationTableNameSource
All Implemented Interfaces
org.hibernate.boot.model.internal.ObjectNameSource

Field Summary

Modifier and TypeField and Description
private final String
private final String

Constructor Summary

AccessConstructor and Description
private
AssociationTableNameSource(String explicitName, String logicalName)

Method Summary

Modifier and TypeMethod and Description
public String
getExplicitName()

Implements org.hibernate.boot.model.internal.ObjectNameSource.getExplicitName.

Retrieve the name explicitly provided by the user.
public String
getLogicalName()

Implements org.hibernate.boot.model.internal.ObjectNameSource.getLogicalName.

Retrieve the logical name for this object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

explicitNameback to summary
private final String explicitName
logicalNameback to summary
private final String logicalName

Constructor Detail

AssociationTableNameSourceback to summary
private AssociationTableNameSource(String explicitName, String logicalName)

Method Detail

getExplicitNameback to summary
public String getExplicitName()

Implements org.hibernate.boot.model.internal.ObjectNameSource.getExplicitName.

Doc from org.hibernate.boot.model.internal.ObjectNameSource.getExplicitName.

Retrieve the name explicitly provided by the user.

Returns:String

The explicit name.

getLogicalNameback to summary
public String getLogicalName()

Implements org.hibernate.boot.model.internal.ObjectNameSource.getLogicalName.

Doc from org.hibernate.boot.model.internal.ObjectNameSource.getLogicalName.

Retrieve the logical name for this object. Usually this is the name under which the "thing" is registered.

Returns:String

The logical name.