public boolean getBoolean(int columnIndex) throws  SQLException { Object obj = getObject(columnIndex).toString(); if (obj == null) { return false; } if (obj instanceof Number) { long value = ((Number) obj).longValue(); if (value == 1) { return true; } else if (value == 0) { return false; } else { throw new SQLException("can't interpret value as boolean: " + value); } } if (obj instanceof String) { String value = (String) obj; if (value.equalsIgnoreCase("T") || value.equalsIgnoreCase("TRUE")) { return true; } else if (value.equalsIgnoreCase("F") || value.equalsIgnoreCase("FALSE")) { return false; } else { throw new SQLException("can't interpret value as boolean: " + value); } } else { throw new SQLException("Illegal type conversion"); }
public boolean getBoolean(int columnIndex) throws SQLException { return getField(columnIndex).getBoolean();
    public boolean getBoolean(int columnIndex) throws  SQLException {        Object obj = getObject(columnIndex).toString();        if (obj == null) {            return false;        } if (obj instanceof Number) {            long value = ((Number) obj).longValue();            if (value == 1) {                return true;            } else if (value == 0) {                return false;            } else {                throw new SQLException("can't interpret value as boolean: " + value);            }        } if (obj instanceof String) {            String value = (String) obj;            if (value.equalsIgnoreCase("T") || value.equalsIgnoreCase("TRUE")) {                return true;            } else if (value.equalsIgnoreCase("F") || value.equalsIgnoreCase("FALSE")) {                return false;            } else {                throw new SQLException("can't interpret value as boolean: " + value);            }        } else {            throw new SQLException("Illegal type conversion");        }    }