1 package org.jbpm.db.hibernate; 2 3 import org.hibernate.cfg.*; 4 5 public class JbpmNamingStrategy implements NamingStrategy { 6 7 public String classToTableName(String className) { 8 className = className.substring(className.lastIndexOf('.')+1); 9 return "JBPM_"+className.toUpperCase(); 10 } 11 12 public String propertyToColumnName(String propertyName) { 13 return propertyName.toUpperCase()+"_"; 14 } 15 16 public String tableName(String tableName) { 17 return "JBPM_"+tableName; 18 } 19 20 public String columnName(String columnName) { 21 return columnName+"_"; 22 } 23 24 public String propertyToTableName(String className, String propertyName) { 25 return classToTableName(className)+"_"+propertyName.toUpperCase(); 26 } 27 } 28 | Popular Tags |