Java SQL ResultSet Boolean Read getBooleanFromResultSet(ResultSet rset, String field)

Here you can find the source of getBooleanFromResultSet(ResultSet rset, String field)

Description

get Boolean From Result Set

License

Open Source License

Declaration

public static boolean getBooleanFromResultSet(ResultSet rset, String field) throws SQLException 

Method Source Code

//package com.java2s;
/**// w ww  .j  a v  a  2 s.c o m
 Copyright (c) 2013, Amit Lieberman
All rights reserved.
    
           GNU LESSER GENERAL PUBLIC LICENSE
               Version 3, 29 June 2007
    
 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
    
    
  This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License
    
 * Created with love
 * User: shpandrak
 * Date: 10/20/12
 * Time: 10:37
 */

import java.sql.ResultSet;
import java.sql.SQLException;

public class Main {
    public static boolean getBooleanFromResultSet(ResultSet rset, String field) throws SQLException {
        return rset.getBoolean(field);
    }

    public static boolean getBooleanFromResultSet(ResultSet rset, int fieldNumber) throws SQLException {
        return rset.getBoolean(fieldNumber);
    }
}

Related

  1. getBoolean(ResultSet rs, int index)
  2. getBoolean(ResultSet rs, String colName)
  3. getBoolean(ResultSet rs, String columnLabel)
  4. getBoolean(ResultSet rs, String columnName)
  5. getBoolean(ResultSet rs, String name)
  6. getBooleanOrNull(ResultSet rs, String column)
  7. getBooleanSuppressSQLException(final ResultSet rs, final String columnLabel)
  8. getBooleanValue(ResultSet resultSet, int columnIndex)