Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » cfg » [javadoc | source]
org.hibernate.cfg
public class: ImprovedNamingStrategy [javadoc | source]
java.lang.Object
   org.hibernate.cfg.ImprovedNamingStrategy

All Implemented Interfaces:
    NamingStrategy, Serializable

An improved naming strategy that prefers embedded underscores to mixed case names
Field Summary
public static final  NamingStrategy INSTANCE    A convenient singleton instance 
Method from org.hibernate.cfg.ImprovedNamingStrategy Summary:
addUnderscores,   classToTableName,   collectionTableName,   columnName,   foreignKeyColumnName,   joinKeyColumnName,   logicalCollectionColumnName,   logicalCollectionTableName,   logicalColumnName,   propertyToColumnName,   tableName
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.cfg.ImprovedNamingStrategy Detail:
 protected static String addUnderscores(String name) 
 public String classToTableName(String className) 
    Return the unqualified class name, mixed case converted to underscores
 public String collectionTableName(String ownerEntity,
    String ownerEntityTable,
    String associatedEntity,
    String associatedEntityTable,
    String propertyName) 
 public String columnName(String columnName) 
    Convert mixed case to underscores
 public String foreignKeyColumnName(String propertyName,
    String propertyEntityName,
    String propertyTableName,
    String referencedColumnName) 
    Return the property name or propertyTableName
 public String joinKeyColumnName(String joinedColumn,
    String joinedTable) 
    Return the argument
 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
 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
 public String logicalColumnName(String columnName,
    String propertyName) 
    Return the column name or the unqualified property name
 public String propertyToColumnName(String propertyName) 
    Return the full property path with underscore seperators, mixed case converted to underscores
 public String tableName(String tableName) 
    Convert mixed case to underscores