public class ImplicitNamingStrategyJpaCompliantImpl extends Object implements ImplicitNamingStrategy, Serializable
Implementation of the ImplicitNamingStrategy contract, generally preferring to conform
to JPA standards.
<p/>
For the legacy JPA-based naming standards initially implemented by Hibernate,
see/use ImplicitNamingStrategyLegacyJpaImpl
| Modifier and Type | Field and Description |
|---|---|
static ImplicitNamingStrategy |
INSTANCE |
| Constructor and Description |
|---|
ImplicitNamingStrategyJpaCompliantImpl() |
| Modifier and Type | Method and 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 entity
|
Identifier |
determineForeignKeyName(ImplicitForeignKeyNameSource source) |
Identifier |
determineIdentifierColumnName(ImplicitIdentifierColumnNameSource source)
Determine the implicit name for the identifier column for the given entity
|
Identifier |
determineIndexName(ImplicitIndexNameSource source) |
Identifier |
determineJoinColumnName(ImplicitJoinColumnNameSource source)
Determine the column name related to
JoinColumn. |
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 to
PrimaryKeyJoinColumn. |
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 entity
|
Identifier |
determineUniqueKeyName(ImplicitUniqueKeyNameSource source) |
protected Identifier |
toIdentifier(String stringForm,
MetadataBuildingContext buildingContext)
Easy hook to build an Identifier using the keyword safe IdentifierHelper.
|
protected String |
transformAttributePath(AttributePath attributePath)
For JPA standards we typically need the unqualified name.
|
protected String |
transformEntityName(EntityNaming entityNaming) |
public static final ImplicitNamingStrategy INSTANCE
public ImplicitNamingStrategyJpaCompliantImpl()
public Identifier determinePrimaryTableName(ImplicitEntityNameSource source)
ImplicitNamingStrategyDetermine the implicit name of an entity’s primary table.
determinePrimaryTableName in interface ImplicitNamingStrategysource - The source informationprotected String transformEntityName(EntityNaming entityNaming)
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source)
ImplicitNamingStrategyDetermine the name of an association join table given the source naming information, when a name is not explicitly given.
determineJoinTableName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source)
ImplicitNamingStrategyDetermine the name of a collection join table given the source naming information, when a name is not explicitly given.
determineCollectionTableName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineIdentifierColumnName(ImplicitIdentifierColumnNameSource source)
ImplicitNamingStrategyDetermine the implicit name for the identifier column for the given entity
determineIdentifierColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineDiscriminatorColumnName(ImplicitDiscriminatorColumnNameSource source)
ImplicitNamingStrategyDetermine the implicit name for the discriminator column for the given entity
determineDiscriminatorColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineTenantIdColumnName(ImplicitTenantIdColumnNameSource source)
ImplicitNamingStrategyDetermine the implicit name for the tenant (multi-tenancy) identifier column for the given entity
determineTenantIdColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source)
ImplicitNamingStrategyDetermine the name of an attribute’s column given the source naming information, when a name is not explicitly given.
determineBasicColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source)
ImplicitNamingStrategyDetermine the column name related to JoinColumn. In
hbm.xml terms, this would be a <key/> defined for a collection
or the column associated with a many-to-one.
determineJoinColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determinePrimaryKeyJoinColumnName(ImplicitPrimaryKeyJoinColumnNameSource source)
ImplicitNamingStrategyDetermine the column name related to PrimaryKeyJoinColumn. In
hbm.xml terms, this would be a <key/> defined for a <join/>
or a <joined-subclass/> (others?)
determinePrimaryKeyJoinColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineAnyDiscriminatorColumnName(ImplicitAnyDiscriminatorColumnNameSource source)
ImplicitNamingStrategyDetermine the column name related to the discriminator portion of an ANY mapping when no explicit column name is given.
determineAnyDiscriminatorColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineAnyKeyColumnName(ImplicitAnyKeyColumnNameSource source)
ImplicitNamingStrategyDetermine the column name related to the key/id portion of an ANY mapping when no explicit column name is given.
determineAnyKeyColumnName in interface ImplicitNamingStrategysource - The source informationpublic Identifier determineMapKeyColumnName(ImplicitMapKeyColumnNameSource source)
determineMapKeyColumnName in interface ImplicitNamingStrategypublic Identifier determineListIndexColumnName(ImplicitIndexColumnNameSource source)
determineListIndexColumnName in interface ImplicitNamingStrategypublic Identifier determineForeignKeyName(ImplicitForeignKeyNameSource source)
determineForeignKeyName in interface ImplicitNamingStrategypublic Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source)
determineUniqueKeyName in interface ImplicitNamingStrategypublic Identifier determineIndexName(ImplicitIndexNameSource source)
determineIndexName in interface ImplicitNamingStrategyprotected 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
attributePath - The attribute pathprotected Identifier toIdentifier(String stringForm, MetadataBuildingContext buildingContext)
Easy hook to build an Identifier using the keyword safe IdentifierHelper.
stringForm - The String form of the namebuildingContext - Access to the IdentifierHelperCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.