1 10 11 package com.triactive.jdo.store; 12 13 14 class ColumnIdentifier extends SQLIdentifier 15 { 16 public ColumnIdentifier(DatabaseAdapter dba, String javaName) 17 { 18 super(dba); 19 20 setJavaName(javaName); 21 } 22 23 24 public ColumnIdentifier(DatabaseAdapter dba, String javaName, Class type, Role role) 25 { 26 super(dba); 27 28 setJavaName(javaName); 29 setSQLIdentifier(getSQLIdentifier() + role.getSQLIdentifierSuffix(dba, type)); 30 } 31 32 33 public ColumnIdentifier(DatabaseAdapter dba, SQLIdentifier baseSQLID, Class type, Role role) 34 { 35 super(dba); 36 37 this.javaName = null; 38 39 String baseID = truncate(baseSQLID.getSQLIdentifier(), getMaxLength()); 40 41 setSQLIdentifier(baseID + role.getSQLIdentifierSuffix(dba, type)); 42 } 43 44 45 protected int getMaxLength() 46 { 47 return dba.getMaxColumnNameLength() - Role.MAX_SUFFIX_LENGTH; 48 } 49 } 50 | Popular Tags |