1 package org.hibernate.cfg; 3 4 import java.io.Serializable ; 5 6 import org.hibernate.util.StringHelper; 7 8 13 public class DefaultNamingStrategy implements NamingStrategy, Serializable { 14 15 18 public static final NamingStrategy INSTANCE = new DefaultNamingStrategy(); 19 20 protected DefaultNamingStrategy() {} 21 22 25 public String classToTableName(String className) { 26 return StringHelper.unqualify(className); 27 } 28 31 public String propertyToColumnName(String propertyName) { 32 return StringHelper.unqualify(propertyName); 33 } 34 37 public String tableName(String tableName) { 38 return tableName; 39 } 40 43 public String columnName(String columnName) { 44 return columnName; 45 } 46 49 public String propertyToTableName(String className, String propertyName) { 50 return StringHelper.unqualify(propertyName); 51 } 52 } | Popular Tags |