1 package org.hibernate.ce.auction.persistence; 2 3 import org.hibernate.cfg.NamingStrategy; 4 import org.hibernate.util.StringHelper; 5 6 29 public class CENamingStrategy implements NamingStrategy { 30 31 public String classToTableName(String className) { 32 return StringHelper.unqualify(className); 33 } 34 35 public String propertyToColumnName(String propertyName) { 36 return propertyName; 37 } 38 39 public String tableName(String tableName) { 40 return "CE_" + tableName; 41 } 42 43 public String columnName(String columnName) { 44 return columnName; 45 } 46 47 public String propertyToTableName(String className, String propertyName) { 48 return "CE_" 49 + classToTableName(className) 50 + '_' 51 + propertyToColumnName(propertyName); 52 } 53 54 } 55 | Popular Tags |