public long getLong(int columnIndex) throws  SQLException { Object obj = getObject(columnIndex); if (obj == null) { return 0; } if (obj instanceof Number) { return ((Number) obj).longValue(); } if (obj instanceof String) { try { return Long.parseLong((String) obj); } catch (NumberFormatException ex) { throw new SQLException("Number format error"); } } else { throw new SQLException("Illegal type conversion"); }
public long getLong(int columnIndex) throws SQLException { return getField(columnIndex).getLong();
    public long getLong(int columnIndex) throws  SQLException {        Object obj = getObject(columnIndex);        if (obj == null) {            return 0;        } if (obj instanceof Number) {            return ((Number) obj).longValue();        } if (obj instanceof String) {            try {                return Long.parseLong((String) obj);            } catch (NumberFormatException ex) {                throw new SQLException("Number format error");            }        } else {            throw new SQLException("Illegal type conversion");        }    }