a better alternative
| Modifier and Type | Field and Description |
|---|---|
| public static final NamingStrategy | INSTANCE
The singleton instance |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | classToTableName(String
the fully-qualified class name className)Implements org. |
| public String | collectionTableName(String ownerEntity, String
owner side table name ownerEntityTable, String associatedEntity, String reverse side table name if any associatedEntityTable, String collection role propertyName)Implements org. |
| public String | columnName(String
a column name columnName)Implements org. |
| public String | foreignKeyColumnName(String
the property name involved propertyName, String propertyEntityName, String the property table name involved (logical one) propertyTableName, String the referenced column name involved (logical one) referencedColumnName)Implements org. |
| public String | joinKeyColumnName(String
joined column name (logical one) used to join with joinedColumn, String joined table name (ie the referenced table) used to join with joinedTable)Implements org. |
| public String | logicalCollectionColumnName(String
given column name in the metadata if any columnName, String property name propertyName, String referenced column name (logical one) in the join referencedColumn)Implements org. |
| public String | logicalCollectionTableName(String
the metadata explicit name tableName, String owner table entity table name (logical one) ownerEntityTable, String reverse side table name if any (logical one) associatedEntityTable, String collection role propertyName)Implements org. |
| public String | logicalColumnName(String
given column name if any columnName, String property name of this column propertyName)Implements org. |
| public String | propertyToColumnName(String
a property path propertyName)Implements org. |
| public String | tableName(String
a table name tableName)Implements org. |
| INSTANCE | back to summary |
|---|---|
| public static final NamingStrategy INSTANCE The singleton instance | |
| DefaultNamingStrategy | back to summary |
|---|---|
| public DefaultNamingStrategy() | |
| classToTableName | back to summary |
|---|---|
| public String classToTableName(String className) Implements org. Return the unqualified class name
| |
| collectionTableName | back to summary |
|---|---|
| public String collectionTableName(String ownerEntity, String ownerEntityTable, String associatedEntity, String associatedEntityTable, String propertyName) Implements org. Return the unqualified property name, not the best strategy but a backward compatible one
| |
| columnName | back to summary |
|---|---|
| public String columnName(String columnName) Implements org. Return the argument
| |
| foreignKeyColumnName | back to summary |
|---|---|
| public String foreignKeyColumnName(String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName) Implements org. Return the property name or propertyTableName
| |
| joinKeyColumnName | back to summary |
|---|---|
| public String joinKeyColumnName(String joinedColumn, String joinedTable) Implements org. Return the argument
| |
| logicalCollectionColumnName | back to summary |
|---|---|
| public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) Implements org. Return the column name if explicit or the concatenation of the property name and the referenced column
| |
| logicalCollectionTableName | back to summary |
|---|---|
| public String logicalCollectionTableName(String tableName, String ownerEntityTable, String associatedEntityTable, String propertyName) Implements org. 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
| |
| logicalColumnName | back to summary |
|---|---|
| public String logicalColumnName(String columnName, String propertyName) Implements org. Return the column name or the unqualified property name
| |
| propertyToColumnName | back to summary |
|---|---|
| public String propertyToColumnName(String propertyName) Implements org. Return the unqualified property name
| |
| tableName | back to summary |
|---|---|
| public String tableName(String tableName) Implements org. Return the argument
| |