Package org.hibernate.boot.model.naming
Class CamelCaseToUnderscoresNamingStrategy
- java.lang.Object
-
- org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
-
- All Implemented Interfaces:
PhysicalNamingStrategy
public class CamelCaseToUnderscoresNamingStrategy extends Object implements PhysicalNamingStrategy
Originally copied from Spring Boot as this strategy is popular there (original name is SpringPhysicalNamingStrategy).
-
-
Constructor Summary
Constructors Constructor Description CamelCaseToUnderscoresNamingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Identifier
getIdentifier(String name, boolean quoted, JdbcEnvironment jdbcEnvironment)
Get an identifier for the specified details.protected boolean
isCaseInsensitive(JdbcEnvironment jdbcEnvironment)
Specify whether the database is case sensitive.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 name-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
toPhysicalTypeName
-
-
-
-
Method Detail
-
toPhysicalCatalogName
public Identifier toPhysicalCatalogName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Description copied from interface:PhysicalNamingStrategy
Determine the physical catalog name from the given logical name- Specified by:
toPhysicalCatalogName
in interfacePhysicalNamingStrategy
-
toPhysicalSchemaName
public Identifier toPhysicalSchemaName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Description copied from interface:PhysicalNamingStrategy
Determine the physical schema name from the given logical name- Specified by:
toPhysicalSchemaName
in interfacePhysicalNamingStrategy
-
toPhysicalTableName
public Identifier toPhysicalTableName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Description copied from interface:PhysicalNamingStrategy
Determine the physical table name from the given logical name- Specified by:
toPhysicalTableName
in interfacePhysicalNamingStrategy
-
toPhysicalSequenceName
public Identifier toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Description copied from interface:PhysicalNamingStrategy
Determine the physical sequence name from the given logical name- Specified by:
toPhysicalSequenceName
in interfacePhysicalNamingStrategy
-
toPhysicalColumnName
public Identifier toPhysicalColumnName(Identifier logicalName, JdbcEnvironment jdbcEnvironment)
Description copied from interface:PhysicalNamingStrategy
Determine the physical column name from the given logical name- Specified by:
toPhysicalColumnName
in interfacePhysicalNamingStrategy
-
getIdentifier
protected Identifier getIdentifier(String name, boolean quoted, JdbcEnvironment jdbcEnvironment)
Get an identifier for the specified details. By default this method will return an identifier with the name adapted based on the result ofisCaseInsensitive(JdbcEnvironment)
- Parameters:
name
- the name of the identifierquoted
- if the identifier is quotedjdbcEnvironment
- the JDBC environment- Returns:
- an identifier instance
-
isCaseInsensitive
protected boolean isCaseInsensitive(JdbcEnvironment jdbcEnvironment)
Specify whether the database is case sensitive.- Parameters:
jdbcEnvironment
- the JDBC environment which can be used to determine case- Returns:
- true if the database is case insensitive sensitivity
-
-