站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

NamingStrategy (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.cfg
Interface NamingStrategy

All Known Implementing Classes:
DefaultNamingStrategy, ImprovedNamingStrategy

public interface NamingStrategy

A set of rules for determining the physical column and table names given the information in the mapping document. May be used to implement project-scoped naming standards for database objects.

Author:
Gavin King
See Also:
DefaultNamingStrategy, ImprovedNamingStrategy

Method Summary
 String classToTableName(String className)
          Return a table name for an entity class
 String columnName(String columnName)
          Alter the column name given in the mapping document
 String propertyToColumnName(String propertyName)
          Return a column name for a property path expression
 String propertyToTableName(String className, String propertyName)
          Return a table name for a collection
 String tableName(String tableName)
          Alter the table name given in the mapping document
 

Method Detail

classToTableName

public String classToTableName(String className)
Return a table name for an entity class

Parameters:
className - the fully-qualified class name
Returns:
a table name

propertyToColumnName

public String propertyToColumnName(String propertyName)
Return a column name for a property path expression

Parameters:
propertyName - a property path
Returns:
a column name

tableName

public String tableName(String tableName)
Alter the table name given in the mapping document

Parameters:
tableName - a table name
Returns:
a table name

columnName

public String columnName(String columnName)
Alter the column name given in the mapping document

Parameters:
columnName - a column name
Returns:
a column name

propertyToTableName

public String propertyToTableName(String className,
                                  String propertyName)
Return a table name for a collection

Parameters:
className - the fully-qualified name of the owning entity class
propertyName - a property path
Returns:
a table name