@SuppressWarnings("unchecked") public Object jdbcGet(IResultSet rs, int n) throws SQLException { String s = rs.getString(n); if (s == null || s.length() == 0) return null; if (isOrdinal) { int cnt = StringUtils.toInt(s, 0); Enum<?>[] enums = clz.asSubclass(Enum.class).getEnumConstants(); return enums[cnt]; } else { return Enum.valueOf(clz.asSubclass(Enum.class), s); } }
@Override public Object jdbcGet(IResultSet rs, int n) throws SQLException { String o = rs.getString(n); if (StringUtils.isEmpty(o)) return null; return JSON.parseObject(o, this.getFieldAccessor().getGenericType()); }
public Object jdbcGet(IResultSet rs, int n) throws SQLException { Object obj = rs.getObject(n); if (obj == null) return null; if (obj instanceof Double) return obj; return ((Number) obj).doubleValue(); }
public Object jdbcGet(IResultSet rs, int n) throws SQLException { Object obj = rs.getObject(n); if (obj == null) return null; return obj.toString(); }