Code example for ResultSet

Methods: getObject

0
     * @param columnName 
     * @return true if the column was null. 
     * @throws SQLException 
     */ 
    public static boolean isNull(ResultSet resultSet, String columnName) throws SQLException {
        return null == resultSet.getObject(columnName);
    } 
 
    /** 
     * Transforms a given column from the java.sql.ResultSet from a 
     * java.sql.Timestamp to a java.util.Calendar. 
     *  
     * @param resultSet 
     * @param columnName 
     * @return java.util.Calendar 
     * @throws SQLException 
     */ 
    public static Calendar getCalendar(ResultSet resultSet, String columnName) throws SQLException {
        return getCalendar(resultSet.getTimestamp(columnName));
    }