Top Fields Constructors Methods
org.hibernate.cfg

public Class DefaultComponentSafeNamingStrategy

extends EJB3NamingStrategy
Class Inheritance
Imports
java.util.Locale, org.hibernate.AssertionFailure, org.hibernate.internal.util.StringHelper

Deprecated

as a consequence of EJB3NamingStrategy being deprecated. See corresponding docs for further information.

Author
Emmanuel Bernard

Field Summary

Modifier and TypeField and Description
public static final NamingStrategy
INSTANCE

Hides org.hibernate.cfg.EJB3NamingStrategy.INSTANCE.

Deprecated as a consequence of NamingStrategy being deprecated.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static String
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
)

Overrides org.hibernate.cfg.EJB3NamingStrategy.collectionTableName.

Implements org.hibernate.cfg.NamingStrategy.collectionTableName.

Return a collection table name ie an association having a join table
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
)

Overrides org.hibernate.cfg.EJB3NamingStrategy.foreignKeyColumnName.

Implements org.hibernate.cfg.NamingStrategy.foreignKeyColumnName.

Return the foreign key column name for the given parameters
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
)

Overrides org.hibernate.cfg.EJB3NamingStrategy.logicalCollectionColumnName.

Implements org.hibernate.cfg.NamingStrategy.logicalCollectionColumnName.

Returns the logical foreign key column name used to refer to this column in the mapping metadata
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
)

Overrides org.hibernate.cfg.EJB3NamingStrategy.logicalCollectionTableName.

Implements org.hibernate.cfg.NamingStrategy.logicalCollectionTableName.

Returns the logical collection table name used to refer to a table in the mapping metadata
public String
logicalColumnName(String
given column name if any
columnName
,
String
property name of this column
propertyName
)

Overrides org.hibernate.cfg.EJB3NamingStrategy.logicalColumnName.

Implements org.hibernate.cfg.NamingStrategy.logicalColumnName.

Return the logical column name used to refer to a column in the metadata (like index, unique constraints etc) A full bijection is required between logicalNames and physical ones logicalName have to be case insensitively unique for a given table
public String
propertyToColumnName(String
a property path
propertyName
)

Overrides org.hibernate.cfg.EJB3NamingStrategy.propertyToColumnName.

Implements org.hibernate.cfg.NamingStrategy.propertyToColumnName.

Return a column name for a property path expression
Inherited from org.hibernate.cfg.EJB3NamingStrategy:
classToTableNamecolumnNamejoinKeyColumnNametableName

Field Detail

INSTANCEback to summary
public static final NamingStrategy INSTANCE

Hides org.hibernate.cfg.EJB3NamingStrategy.INSTANCE.

Deprecated

as a consequence of NamingStrategy being deprecated. See corresponding docs for further information.

Constructor Detail

DefaultComponentSafeNamingStrategyback to summary
public DefaultComponentSafeNamingStrategy()

Method Detail

addUnderscoresback to summary
protected static String addUnderscores(String name)
collectionTableNameback to summary
public String collectionTableName(String ownerEntity, String ownerEntityTable, String associatedEntity, String associatedEntityTable, String propertyName)

Overrides org.hibernate.cfg.EJB3NamingStrategy.collectionTableName.

Implements org.hibernate.cfg.NamingStrategy.collectionTableName.

Doc from org.hibernate.cfg.NamingStrategy.collectionTableName.

Return a collection table name ie an association having a join table

Parameters
ownerEntityTable:String

owner side table name

associatedEntityTable:String

reverse side table name if any

propertyName:String

collection role

Annotations
@Override
foreignKeyColumnNameback to summary
public String foreignKeyColumnName(String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName)

Overrides org.hibernate.cfg.EJB3NamingStrategy.foreignKeyColumnName.

Implements org.hibernate.cfg.NamingStrategy.foreignKeyColumnName.

Doc from org.hibernate.cfg.NamingStrategy.foreignKeyColumnName.

Return the foreign key column name for the given parameters

Parameters
propertyName:String

the property name involved

propertyTableName:String

the property table name involved (logical one)

referencedColumnName:String

the referenced column name involved (logical one)

logicalCollectionColumnNameback to summary
public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn)

Overrides org.hibernate.cfg.EJB3NamingStrategy.logicalCollectionColumnName.

Implements org.hibernate.cfg.NamingStrategy.logicalCollectionColumnName.

Doc from org.hibernate.cfg.NamingStrategy.logicalCollectionColumnName.

Returns the logical foreign key column name used to refer to this column in the mapping metadata

Parameters
columnName:String

given column name in the metadata if any

propertyName:String

property name

referencedColumn:String

referenced column name (logical one) in the join

Annotations
@Override
logicalCollectionTableNameback to summary
public String logicalCollectionTableName(String tableName, String ownerEntityTable, String associatedEntityTable, String propertyName)

Overrides org.hibernate.cfg.EJB3NamingStrategy.logicalCollectionTableName.

Implements org.hibernate.cfg.NamingStrategy.logicalCollectionTableName.

Doc from org.hibernate.cfg.NamingStrategy.logicalCollectionTableName.

Returns the logical collection table name used to refer to a table in the mapping metadata

Parameters
tableName:String

the metadata explicit name

ownerEntityTable:String

owner table entity table name (logical one)

associatedEntityTable:String

reverse side table name if any (logical one)

propertyName:String

collection role

Annotations
@Override
logicalColumnNameback to summary
public String logicalColumnName(String columnName, String propertyName)

Overrides org.hibernate.cfg.EJB3NamingStrategy.logicalColumnName.

Implements org.hibernate.cfg.NamingStrategy.logicalColumnName.

Doc from org.hibernate.cfg.NamingStrategy.logicalColumnName.

Return the logical column name used to refer to a column in the metadata (like index, unique constraints etc) A full bijection is required between logicalNames and physical ones logicalName have to be case insensitively unique for a given table

Parameters
columnName:String

given column name if any

propertyName:String

property name of this column

Annotations
@Override
propertyToColumnNameback to summary
public String propertyToColumnName(String propertyName)

Overrides org.hibernate.cfg.EJB3NamingStrategy.propertyToColumnName.

Implements org.hibernate.cfg.NamingStrategy.propertyToColumnName.

Doc from org.hibernate.cfg.NamingStrategy.propertyToColumnName.

Return a column name for a property path expression

Parameters
propertyName:String

a property path

Returns:String

a column name

Annotations
@Override