org.hibernate.cfg
Class DefaultNamingStrategy
java.lang.Object
org.hibernate.cfg.DefaultNamingStrategy
- NamingStrategy, Serializable
public class DefaultNamingStrategy
extends java.lang.Object
The default NamingStrategy
String | classToTableName(String className) - Return the unqualified class name
|
String | collectionTableName(String ownerEntity, String ownerEntityTable, String associatedEntity, String associatedEntityTable, String propertyName) - Return the unqualified property name, not the best strategy but a backward compatible one
|
String | columnName(String columnName) - Return the argument
|
String | foreignKeyColumnName(String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName) - Return the property name or propertyTableName
|
String | joinKeyColumnName(String joinedColumn, String joinedTable) - Return the argument
|
String | logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) - Return the column name if explicit or the concatenation of the property name and the referenced column
|
String | logicalCollectionTableName(String tableName, String ownerEntityTable, String associatedEntityTable, String propertyName) - Returns either the table name if explicit or
if there is an associated table, the concatenation of owner entity table and associated table
otherwise the concatenation of owner entity table and the unqualified property name
|
String | logicalColumnName(String columnName, String propertyName) - Return the column name or the unqualified property name
|
String | propertyToColumnName(String propertyName) - Return the unqualified property name
|
String | tableName(String tableName) - Return the argument
|
INSTANCE
public static final NamingStrategy INSTANCE
The singleton instance
collectionTableName
public String collectionTableName(String ownerEntity,
String ownerEntityTable,
String associatedEntity,
String associatedEntityTable,
String propertyName)
Return the unqualified property name, not the best strategy but a backward compatible one
- collectionTableName in interface NamingStrategy
foreignKeyColumnName
public String foreignKeyColumnName(String propertyName,
String propertyEntityName,
String propertyTableName,
String referencedColumnName)
Return the property name or propertyTableName
- foreignKeyColumnName in interface NamingStrategy
joinKeyColumnName
public String joinKeyColumnName(String joinedColumn,
String joinedTable)
Return the argument
- joinKeyColumnName in interface NamingStrategy
logicalCollectionColumnName
public String logicalCollectionColumnName(String columnName,
String propertyName,
String referencedColumn)
Return the column name if explicit or the concatenation of the property name and the referenced column
- logicalCollectionColumnName in interface NamingStrategy
logicalCollectionTableName
public String logicalCollectionTableName(String tableName,
String ownerEntityTable,
String associatedEntityTable,
String propertyName)
Returns either the table name if explicit or
if there is an associated table, the concatenation of owner entity table and associated table
otherwise the concatenation of owner entity table and the unqualified property name
- logicalCollectionTableName in interface NamingStrategy
logicalColumnName
public String logicalColumnName(String columnName,
String propertyName)
Return the column name or the unqualified property name
- logicalColumnName in interface NamingStrategy