@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; }
@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; }
@Override public String getExternalRepresentation() { if (keyword == null) return scanner.getClass().getName(); else return keyword.name(); }
@Override public Class<T> getType() { return scanner.getType(); }