1 2 12 package com.versant.core.jdbc.sql; 13 14 23 public interface JdbcNameGenerator { 24 25 30 public void setDatabaseType(String db); 31 32 39 public void addTableName(String name) throws IllegalArgumentException ; 40 41 44 public void removeTableName(String name); 45 46 52 public String generateClassTableName(String className); 53 54 65 public String generateLinkTableName(String tableName, String fieldName, 66 String elementTableName); 67 68 72 public void addPkConstraintName(String tableName, String pkConstraintName) 73 throws IllegalArgumentException ; 74 75 81 public String generatePkConstraintName(String tableName); 82 83 87 public void addRefConstraintName(String tableName, String refConstraintName) 88 throws IllegalArgumentException ; 89 90 101 public String generateRefConstraintName(String tableName, 102 String refTableName, String [] fkNames, String [] refPkNames); 103 104 111 public void addColumnName(String tableName, String columnName) 112 throws IllegalArgumentException ; 113 114 117 public boolean isColumnInTable(String tableName, String columnName); 118 119 123 public String generateDatastorePKName(String tableName); 124 125 129 public String generateClassIdColumnName(String tableName); 130 131 134 public String generateFieldColumnName(String tableName, String fieldName, 135 boolean primaryKey); 136 137 150 public void generateRefFieldColumnNames(String tableName, 151 String fieldName, String [] columnNames, String refTableName, 152 String [] refPkNames, boolean otherRefs) 153 throws IllegalArgumentException ; 154 155 166 public void generatePolyRefFieldColumnNames(String tableName, 167 String fieldName, String [] columnNames) 168 throws IllegalArgumentException ; 169 170 179 public void generateLinkTableMainRefNames(String tableName, 180 String [] mainTablePkNames, String [] linkMainRefNames); 181 182 186 public String generateLinkTableSequenceName(String tableName); 187 188 201 public void generateLinkTableValueRefNames(String tableName, 202 String [] valuePkNames, String valueClassName, 203 String [] linkValueRefNames, boolean key); 204 205 213 public String generateLinkTableValueName(String tableName, 214 Class valueCls, boolean key); 215 216 220 public void addIndexName(String tableName, String indexName) 221 throws IllegalArgumentException ; 222 223 227 public String generateIndexName(String tableName, String [] columnNames); 228 229 } 230 231 | Popular Tags |