Package org.hibernate.boot.model.naming
Interface PhysicalNamingStrategy
- All Known Implementing Classes:
CamelCaseToUnderscoresNamingStrategy
,PhysicalNamingStrategySnakeCaseImpl
,PhysicalNamingStrategyStandardImpl
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 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".
-
Method Summary
Modifier and TypeMethodDescriptiontoPhysicalCatalogName
(Identifier logicalName, JdbcEnvironment jdbcEnvironment) Determine the physical catalog name from the given logical nametoPhysicalColumnName
(Identifier logicalName, JdbcEnvironment jdbcEnvironment) Determine the physical column name from the given logical nametoPhysicalSchemaName
(Identifier logicalName, JdbcEnvironment jdbcEnvironment) Determine the physical schema name from the given logical nametoPhysicalSequenceName
(Identifier logicalName, JdbcEnvironment jdbcEnvironment) Determine the physical sequence name from the given logical nametoPhysicalTableName
(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 Details
-
toPhysicalCatalogName
Determine the physical catalog name from the given logical name -
toPhysicalSchemaName
Determine the physical schema name from the given logical name -
toPhysicalTableName
Determine the physical table name from the given logical name -
toPhysicalSequenceName
Determine the physical sequence name from the given logical name -
toPhysicalColumnName
Determine the physical column name from the given logical name -
toPhysicalTypeName
Determine the physical UDT type name from the given logical name
-