public java.sql.Date getDate(int columnIndex) throws  SQLException { Object obj = getObject(columnIndex); if (obj == null) { return null; } else if (obj instanceof java.sql.Date) { return (java.sql.Date) obj; } else if (obj instanceof java.sql.Timestamp) { return new java.sql.Date(((java.sql.Timestamp) obj).getTime()); } if (obj instanceof String) { return java.sql.Date.valueOf((String) obj); } else { throw new SQLException("Illegal type conversion"); }
public java.sql.Date getDate(int columnIndex) throws SQLException { return getField(columnIndex).getDate();
    public java.sql.Date getDate(int columnIndex) throws  SQLException {        Object obj = getObject(columnIndex);        if (obj == null) {            return null;        } else if (obj instanceof java.sql.Date) {            return (java.sql.Date) obj;        } else if (obj instanceof java.sql.Timestamp) {            return new java.sql.Date(((java.sql.Timestamp) obj).getTime());        } if (obj instanceof String) {            return java.sql.Date.valueOf((String) obj);        } else {            throw new SQLException("Illegal type conversion");        }    }