Package org.hibernate.boot.model.naming
Interface ImplicitNamingStrategy
-
- All Known Implementing Classes:
ImplicitNamingStrategyComponentPathImpl
,ImplicitNamingStrategyJpaCompliantImpl
,ImplicitNamingStrategyLegacyHbmImpl
,ImplicitNamingStrategyLegacyJpaImpl
public interface ImplicitNamingStrategy
Pluggable strategy for applying implicit naming rules when an explicit name is not given. NOTE: the method names here mostly favor the JPA naming (aka, secondary table rather than join) Methods fall into 2 main categories:-
Table naming
-
Entity primary table -
determinePrimaryTableName(org.hibernate.boot.model.naming.ImplicitEntityNameSource)
. Used when the primary table for an entity is not explicitly named in the metadata. SeeTable
for details. -
Join table -
determineJoinTableName(org.hibernate.boot.model.naming.ImplicitJoinTableNameSource)
. SeeJoinTable
for details. Join table covers basically any entity association whether in the form of a collection of entities (one-to-many, many-to-many) or a singular entity association (many-to-one, and occasionally one-to-one). -
Collection table -
determineCollectionTableName(org.hibernate.boot.model.naming.ImplicitCollectionTableNameSource)
- Collection table refers to any non-entity collection (basic, component/embeddable, any). SeeCollectionTable
for details. - Notice that secondary tables are not mentioned, since they must always be explicitly named
-
Entity primary table -
-
Column naming
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Identifier
determineAnyDiscriminatorColumnName(ImplicitAnyDiscriminatorColumnNameSource source)
Determine the column name related to the discriminator portion of an ANY mapping when no explicit column name is given.Identifier
determineAnyKeyColumnName(ImplicitAnyKeyColumnNameSource source)
Determine the column name related to the key/id portion of an ANY mapping when no explicit column name is given.Identifier
determineBasicColumnName(ImplicitBasicColumnNameSource source)
Determine the name of an attribute's column given the source naming information, when a name is not explicitly given.Identifier
determineCollectionTableName(ImplicitCollectionTableNameSource source)
Determine the name of a collection join table given the source naming information, when a name is not explicitly given.Identifier
determineDiscriminatorColumnName(ImplicitDiscriminatorColumnNameSource source)
Determine the implicit name for the discriminator column for the given entityIdentifier
determineForeignKeyName(ImplicitForeignKeyNameSource source)
Identifier
determineIdentifierColumnName(ImplicitIdentifierColumnNameSource source)
Determine the implicit name for the identifier column for the given entityIdentifier
determineIndexName(ImplicitIndexNameSource source)
Identifier
determineJoinColumnName(ImplicitJoinColumnNameSource source)
Determine the column name related toJoinColumn
.Identifier
determineJoinTableName(ImplicitJoinTableNameSource source)
Determine the name of an association join table given the source naming information, when a name is not explicitly given.Identifier
determineListIndexColumnName(ImplicitIndexColumnNameSource source)
Identifier
determineMapKeyColumnName(ImplicitMapKeyColumnNameSource source)
Identifier
determinePrimaryKeyJoinColumnName(ImplicitPrimaryKeyJoinColumnNameSource source)
Determine the column name related toPrimaryKeyJoinColumn
.Identifier
determinePrimaryTableName(ImplicitEntityNameSource source)
Determine the implicit name of an entity's primary table.Identifier
determineTenantIdColumnName(ImplicitTenantIdColumnNameSource source)
Determine the implicit name for the tenant (multi-tenancy) identifier column for the given entityIdentifier
determineUniqueKeyName(ImplicitUniqueKeyNameSource source)
-
-
-
Method Detail
-
determinePrimaryTableName
Identifier determinePrimaryTableName(ImplicitEntityNameSource source)
Determine the implicit name of an entity's primary table.- Parameters:
source
- The source information- Returns:
- The implicit table name.
-
determineJoinTableName
Identifier determineJoinTableName(ImplicitJoinTableNameSource source)
Determine the name of an association join table given the source naming information, when a name is not explicitly given.- Parameters:
source
- The source information- Returns:
- The implicit table name.
-
determineCollectionTableName
Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source)
Determine the name of a collection join table given the source naming information, when a name is not explicitly given.- Parameters:
source
- The source information- Returns:
- The implicit table name.
-
determineDiscriminatorColumnName
Identifier determineDiscriminatorColumnName(ImplicitDiscriminatorColumnNameSource source)
Determine the implicit name for the discriminator column for the given entity- Parameters:
source
- The source information- Returns:
- The implicit discriminator column name
-
determineTenantIdColumnName
Identifier determineTenantIdColumnName(ImplicitTenantIdColumnNameSource source)
Determine the implicit name for the tenant (multi-tenancy) identifier column for the given entity- Parameters:
source
- The source information- Returns:
- The determined tenant identifier column name
-
determineIdentifierColumnName
Identifier determineIdentifierColumnName(ImplicitIdentifierColumnNameSource source)
Determine the implicit name for the identifier column for the given entity- Parameters:
source
- The source information- Returns:
- The determined identifier column name
-
determineBasicColumnName
Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source)
Determine the name of an attribute's column given the source naming information, when a name is not explicitly given.- Parameters:
source
- The source information- Returns:
- The implicit column name.
-
determineJoinColumnName
Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source)
Determine the column name related toJoinColumn
. Inhbm.xml
terms, this would be a<key/>
defined for a collection or the column associated with a many-to-one.- Parameters:
source
- The source information- Returns:
- The determined join column name
-
determinePrimaryKeyJoinColumnName
Identifier determinePrimaryKeyJoinColumnName(ImplicitPrimaryKeyJoinColumnNameSource source)
Determine the column name related toPrimaryKeyJoinColumn
. Inhbm.xml
terms, this would be a<key/>
defined for a<join/>
or a<joined-subclass/>
(others?)- Parameters:
source
- The source information- Returns:
- The determined column name
-
determineAnyDiscriminatorColumnName
Identifier determineAnyDiscriminatorColumnName(ImplicitAnyDiscriminatorColumnNameSource source)
Determine the column name related to the discriminator portion of an ANY mapping when no explicit column name is given.- Parameters:
source
- The source information- Returns:
- The determined column name
-
determineAnyKeyColumnName
Identifier determineAnyKeyColumnName(ImplicitAnyKeyColumnNameSource source)
Determine the column name related to the key/id portion of an ANY mapping when no explicit column name is given.- Parameters:
source
- The source information- Returns:
- The determined identifier column name
-
determineMapKeyColumnName
Identifier determineMapKeyColumnName(ImplicitMapKeyColumnNameSource source)
-
determineListIndexColumnName
Identifier determineListIndexColumnName(ImplicitIndexColumnNameSource source)
-
determineForeignKeyName
Identifier determineForeignKeyName(ImplicitForeignKeyNameSource source)
-
determineUniqueKeyName
Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source)
-
determineIndexName
Identifier determineIndexName(ImplicitIndexNameSource source)
-
-