Example #1
0
 public String getStringForDB(Field field) {
   switch (field.getBasisColumn().getColumnType()) {
     case Integer:
       Integer value = getInteger(field.getName());
       if (value == null) return null;
       return value.toString();
     case AutoIncrement:
       return getInteger(field.getName()).toString();
     case Boolean:
       // Remember to support Y/N as well somehow
       return getBoolean(field.getName()) ? "1" : "0";
   }
   return getString(field.getName());
 }
Example #2
0
 public String getString(Field field) {
   return getString(field.getName());
 }