Esempio n. 1
0
 @SuppressWarnings("unchecked")
 @Override
 public String toString(Object value) throws T2DBException {
   String result = null;
   try {
     if (!isRestricted() || values.containsKey(value)) result = scanner.toString((T) value);
   } catch (Exception e) {
     throw T2DBMsg.exception(e, D.D10114, value, getName());
   }
   return result;
 }
Esempio n. 2
0
 @Override
 public T scan(String value) throws T2DBException {
   T result = null;
   if (value != null && value.length() == 0 && !isRestricted()) value = null;
   if (value != null) {
     result = scanner.scan(value);
     if (result == null) {
       // interpret value "" as null, except for String
       if (value.length() != 0) throw T2DBMsg.exception(D.D10114, value, getName());
     } else check(result);
   }
   return result;
 }
Esempio n. 3
0
 @Override
 public String getExternalRepresentation() {
   if (keyword == null) return scanner.getClass().getName();
   else return keyword.name();
 }
Esempio n. 4
0
 @Override
 public Class<T> getType() {
   return scanner.getType();
 }