Esempio n. 1
0
 public Collection<String> getPrimaryKeyWhereClauseNames() {
   if (consistsOfSingleFromVariable()) {
     Table table = ((FromVariable) expression.getWords().get(0)).getObject().getTable();
     Collection<String> res = new ArrayList<String>();
     Iterator<Field> iter = table.getPrimaryKeyFields().iterator();
     while (iter.hasNext()) {
       Field field = iter.next();
       res.add(acceptWhereClauseFullName(DatabaseManager.getInstance().getQueryBuilder(), field));
     }
     return res;
   } else {
     System.err.println("Error : trying to get a field from a variable that does not know it");
     return null;
   }
 }
Esempio n. 2
0
 public Collection<String> getPrimaryKeyColumnNames() {
   if (consistsOfSingleFromVariable()) {
     Table table = ((FromVariable) expression.getWords().get(0)).getObject().getTable();
     Collection<String> res = new ArrayList<String>();
     Iterator<Field> iter = table.getPrimaryKeyFields().iterator();
     while (iter.hasNext()) {
       Field field = iter.next();
       res.add(getFullColumnName(field));
     }
     return res;
   } else {
     System.err.println("Error : trying to get a field from a variable that does not know it");
     return null;
   }
 }