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

public Interface PhysicalNamingStrategy

Known Direct Implementers
org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl, org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
Annotations
@Incubating
Imports
org.hibernate.Incubating, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment

A set of rules for determining the physical names of objects in a relational database schema from the logical names specified by the object/relational mappings.

Logical names provide an additional level of indirection between the mappings and the database schema, and a PhysicalNamingStrategy even allows the use of more "natural" naming within the mappings in cases where the relational schema features especially inelegant legacy naming conventions. For example, it could shield the mappings from old-fashioned practices like prefixing table names with TBL_.

Note, however, that handwritten native SQL must be written in terms of physical names, so the abstraction here is in some sense "incomplete".

A PhysicalNamingStrategy may be selected using the configuration property hibernate.physical_naming_strategy.

Author
Steve Ebersole
See Also
ImplicitNamingStrategy, org.hibernate.cfg.Configuration#setPhysicalNamingStrategy(PhysicalNamingStrategy), org.hibernate.boot.MetadataBuilder#applyPhysicalNamingStrategy(PhysicalNamingStrategy), org.hibernate.cfg.AvailableSettings#PHYSICAL_NAMING_STRATEGY

Method Summary

Modifier and TypeMethod and Description
public Identifier
toPhysicalCatalogName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical catalog name from the given logical name

public Identifier
toPhysicalColumnName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical column name from the given logical name

public Identifier
toPhysicalSchemaName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical schema name from the given logical name

public Identifier
toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical sequence name from the given logical name

public Identifier
toPhysicalTableName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical table name from the given logical name

public default Identifier
toPhysicalTypeName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical UDT type name from the given logical name

Method Detail

toPhysicalCatalogNameback to summary
public Identifier toPhysicalCatalogName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical catalog name from the given logical name

toPhysicalColumnNameback to summary
public Identifier toPhysicalColumnName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical column name from the given logical name

toPhysicalSchemaNameback to summary
public Identifier toPhysicalSchemaName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical schema name from the given logical name

toPhysicalSequenceNameback to summary
public Identifier toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical sequence name from the given logical name

toPhysicalTableNameback to summary
public Identifier toPhysicalTableName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical table name from the given logical name

toPhysicalTypeNameback to summary
public default Identifier toPhysicalTypeName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)

Determine the physical UDT type name from the given logical name