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 java.lang.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 IdentifiergetIdentifier(java.lang.String name, boolean quoted, JdbcEnvironment jdbcEnvironment)Get an identifier for the specified details.protected booleanisCaseInsensitive(JdbcEnvironment jdbcEnvironment)Specify whether the database is case sensitive.IdentifiertoPhysicalCatalogName(Identifier name, JdbcEnvironment jdbcEnvironment)IdentifiertoPhysicalColumnName(Identifier name, JdbcEnvironment jdbcEnvironment)IdentifiertoPhysicalSchemaName(Identifier name, JdbcEnvironment jdbcEnvironment)IdentifiertoPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment)IdentifiertoPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment)
-
-
-
Method Detail
-
toPhysicalCatalogName
public Identifier toPhysicalCatalogName(Identifier name, JdbcEnvironment jdbcEnvironment)
- Specified by:
toPhysicalCatalogNamein interfacePhysicalNamingStrategy
-
toPhysicalSchemaName
public Identifier toPhysicalSchemaName(Identifier name, JdbcEnvironment jdbcEnvironment)
- Specified by:
toPhysicalSchemaNamein interfacePhysicalNamingStrategy
-
toPhysicalTableName
public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment)
- Specified by:
toPhysicalTableNamein interfacePhysicalNamingStrategy
-
toPhysicalSequenceName
public Identifier toPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment)
- Specified by:
toPhysicalSequenceNamein interfacePhysicalNamingStrategy
-
toPhysicalColumnName
public Identifier toPhysicalColumnName(Identifier name, JdbcEnvironment jdbcEnvironment)
- Specified by:
toPhysicalColumnNamein interfacePhysicalNamingStrategy
-
getIdentifier
protected Identifier getIdentifier(java.lang.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
-
-