Package org.hibernate.boot.model.naming
Interface PhysicalNamingStrategy
-
- All Known Implementing Classes:
CamelCaseToUnderscoresNamingStrategy
,PhysicalNamingStrategyStandardImpl
@Incubating public interface PhysicalNamingStrategy
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.- A physical name is a name used to interact with the database, and will always be used in generated SQL, both DML and DDL.
- A logical name is a name used to within annotations of Java code and XML mapping documents.
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 withTBL_
.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".
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Identifier
toPhysicalCatalogName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical catalog name from the given logical nameIdentifier
toPhysicalColumnName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical column name from the given logical nameIdentifier
toPhysicalSchemaName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical schema name from the given logical nameIdentifier
toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical sequence name from the given logical nameIdentifier
toPhysicalTableName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical table name from the given logical namedefault Identifier
toPhysicalTypeName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical UDT type name from the given logical name
-
-
-
Method Detail
-
toPhysicalCatalogName
Identifier toPhysicalCatalogName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical catalog name from the given logical name
-
toPhysicalSchemaName
Identifier toPhysicalSchemaName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical schema name from the given logical name
-
toPhysicalTableName
Identifier toPhysicalTableName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical table name from the given logical name
-
toPhysicalSequenceName
Identifier toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical sequence name from the given logical name
-
toPhysicalColumnName
Identifier toPhysicalColumnName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical column name from the given logical name
-
toPhysicalTypeName
default Identifier toPhysicalTypeName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Determine the physical UDT type name from the given logical name
-
-