Top Description Fields Constructors Methods
org.hibernate.boot.model.naming

public Class ImplicitNamingStrategyJpaCompliantImpl

extends Object
implements ImplicitNamingStrategy, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.boot.model.naming.ImplicitNamingStrategy
Known Direct Subclasses
org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl, org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl, org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl
Imports
java.io.Serializable, org.hibernate.HibernateException, org.hibernate.boot.model.source.spi.AttributePath, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.internal.util.StringHelper

Implementation of the ImplicitNamingStrategy contract, generally preferring to conform to JPA standards.

For the legacy JPA-based naming standards initially implemented by Hibernate, see/use org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final ImplicitNamingStrategy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Identifier
determineAnyDiscriminatorColumnName(ImplicitAnyDiscriminatorColumnNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineAnyDiscriminatorColumnName.

Determine the column name related to the discriminator portion of an ANY mapping when no explicit column name is given.
public Identifier
determineAnyKeyColumnName(ImplicitAnyKeyColumnNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineAnyKeyColumnName.

Determine the column name related to the key/id portion of an ANY mapping when no explicit column name is given.
public Identifier
determineBasicColumnName(ImplicitBasicColumnNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineBasicColumnName.

Determine the name of an attribute's column given the source naming information, when a name is not explicitly given.
public Identifier
determineCollectionTableName(ImplicitCollectionTableNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineCollectionTableName.

Determine the name of a collection join table given the source naming information, when a name is not explicitly given.
public Identifier
determineDiscriminatorColumnName(ImplicitDiscriminatorColumnNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineDiscriminatorColumnName.

Determine the implicit name for the discriminator column for the given entity
public Identifier
public Identifier
determineIdentifierColumnName(ImplicitIdentifierColumnNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineIdentifierColumnName.

Determine the implicit name for the identifier column for the given entity
public Identifier
public Identifier
public Identifier
determineJoinTableName(ImplicitJoinTableNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineJoinTableName.

Determine the name of an association join table given the source naming information, when a name is not explicitly given.
public Identifier
public Identifier
public Identifier
public Identifier
determinePrimaryTableName(ImplicitEntityNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determinePrimaryTableName.

Determine the implicit name of an entity's primary table.
public Identifier
determineTenantIdColumnName(ImplicitTenantIdColumnNameSource
The source information
source
)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineTenantIdColumnName.

Determine the implicit name for the tenant (multi-tenancy) identifier column for the given entity
public Identifier
protected Identifier

Returns:

The identifier
toIdentifier
(String
The String form of the name
stringForm
,
MetadataBuildingContext
Access to the IdentifierHelper
buildingContext
)

Easy hook to build an Identifier using the keyword safe IdentifierHelper.

protected String

Returns:

The extracted name
transformAttributePath
(AttributePath
The attribute path
attributePath
)

For JPA standards we typically need the unqualified name.

protected String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final ImplicitNamingStrategy INSTANCE

Constructor Detail

ImplicitNamingStrategyJpaCompliantImplback to summary
public ImplicitNamingStrategyJpaCompliantImpl()

Method Detail

determineAnyDiscriminatorColumnNameback to summary
public Identifier determineAnyDiscriminatorColumnName(ImplicitAnyDiscriminatorColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineAnyDiscriminatorColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineAnyDiscriminatorColumnName.

Determine the column name related to the discriminator portion of an ANY mapping when no explicit column name is given.

Parameters
source:ImplicitAnyDiscriminatorColumnNameSource

The source information

Returns:Identifier

The determined column name

Annotations
@Override
determineAnyKeyColumnNameback to summary
public Identifier determineAnyKeyColumnName(ImplicitAnyKeyColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineAnyKeyColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineAnyKeyColumnName.

Determine the column name related to the key/id portion of an ANY mapping when no explicit column name is given.

Parameters
source:ImplicitAnyKeyColumnNameSource

The source information

Returns:Identifier

The determined identifier column name

Annotations
@Override
determineBasicColumnNameback to summary
public Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineBasicColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineBasicColumnName.

Determine the name of an attribute's column given the source naming information, when a name is not explicitly given.

Parameters
source:ImplicitBasicColumnNameSource

The source information

Returns:Identifier

The implicit column name.

Annotations
@Override
determineCollectionTableNameback to summary
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineCollectionTableName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineCollectionTableName.

Determine the name of a collection join table given the source naming information, when a name is not explicitly given.

Parameters
source:ImplicitCollectionTableNameSource

The source information

Returns:Identifier

The implicit table name.

Annotations
@Override
determineDiscriminatorColumnNameback to summary
public Identifier determineDiscriminatorColumnName(ImplicitDiscriminatorColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineDiscriminatorColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineDiscriminatorColumnName.

Determine the implicit name for the discriminator column for the given entity

Parameters
source:ImplicitDiscriminatorColumnNameSource

The source information

Returns:Identifier

The implicit discriminator column name

Annotations
@Override
determineForeignKeyNameback to summary
public Identifier determineForeignKeyName(ImplicitForeignKeyNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineForeignKeyName.

Annotations
@Override
determineIdentifierColumnNameback to summary
public Identifier determineIdentifierColumnName(ImplicitIdentifierColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineIdentifierColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineIdentifierColumnName.

Determine the implicit name for the identifier column for the given entity

Parameters
source:ImplicitIdentifierColumnNameSource

The source information

Returns:Identifier

The determined identifier column name

Annotations
@Override
determineIndexNameback to summary
public Identifier determineIndexName(ImplicitIndexNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineIndexName.

Annotations
@Override
determineJoinColumnNameback to summary
public Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineJoinColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineJoinColumnName.

Determine the column name related to javax.persistence.JoinColumn. In hbm.xml terms, this would be a <key/> defined for a collection or the column associated with a many-to-one.

Parameters
source:ImplicitJoinColumnNameSource

The source information

Returns:Identifier

The determined join column name

Annotations
@Override
determineJoinTableNameback to summary
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineJoinTableName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineJoinTableName.

Determine the name of an association join table given the source naming information, when a name is not explicitly given.

Parameters
source:ImplicitJoinTableNameSource

The source information

Returns:Identifier

The implicit table name.

Annotations
@Override
determineListIndexColumnNameback to summary
public Identifier determineListIndexColumnName(ImplicitIndexColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineListIndexColumnName.

Annotations
@Override
determineMapKeyColumnNameback to summary
public Identifier determineMapKeyColumnName(ImplicitMapKeyColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineMapKeyColumnName.

Annotations
@Override
determinePrimaryKeyJoinColumnNameback to summary
public Identifier determinePrimaryKeyJoinColumnName(ImplicitPrimaryKeyJoinColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determinePrimaryKeyJoinColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determinePrimaryKeyJoinColumnName.

Determine the column name related to javax.persistence.PrimaryKeyJoinColumn. In hbm.xml terms, this would be a <key/> defined for a <join/> or a <joined-subclass/> (others?)

Parameters
source:ImplicitPrimaryKeyJoinColumnNameSource

The source information

Returns:Identifier

The determined column name

Annotations
@Override
determinePrimaryTableNameback to summary
public Identifier determinePrimaryTableName(ImplicitEntityNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determinePrimaryTableName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determinePrimaryTableName.

Determine the implicit name of an entity's primary table.

Parameters
source:ImplicitEntityNameSource

The source information

Returns:Identifier

The implicit table name.

Annotations
@Override
determineTenantIdColumnNameback to summary
public Identifier determineTenantIdColumnName(ImplicitTenantIdColumnNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineTenantIdColumnName.

Doc from org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineTenantIdColumnName.

Determine the implicit name for the tenant (multi-tenancy) identifier column for the given entity

Parameters
source:ImplicitTenantIdColumnNameSource

The source information

Returns:Identifier

The determined tenant identifier column name

Annotations
@Override
determineUniqueKeyNameback to summary
public Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source)

Implements org.hibernate.boot.model.naming.ImplicitNamingStrategy.determineUniqueKeyName.

Annotations
@Override
toIdentifierback to summary
protected Identifier toIdentifier(String stringForm, MetadataBuildingContext buildingContext)

Easy hook to build an Identifier using the keyword safe IdentifierHelper.

Parameters
stringForm:String

The String form of the name

buildingContext:MetadataBuildingContext

Access to the IdentifierHelper

Returns:Identifier

The identifier

transformAttributePathback to summary
protected String transformAttributePath(AttributePath attributePath)

For JPA standards we typically need the unqualified name. However, a more usable impl tends to use the whole path. This method provides an easy hook for subclasses to accomplish that

Parameters
attributePath:AttributePath

The attribute path

Returns:String

The extracted name

transformEntityNameback to summary
protected String transformEntityName(EntityNaming entityNaming)