Java SQL ResultSet Boolean Read getBoolean(ResultSet rs, int index)

Here you can find the source of getBoolean(ResultSet rs, int index)

Description

get Boolean

License

Open Source License

Declaration

public static boolean getBoolean(ResultSet rs, int index) throws java.sql.SQLException 

Method Source Code


//package com.java2s;
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

import java.sql.ResultSet;

public class Main {
    public static boolean getBoolean(ResultSet rs, int index) throws java.sql.SQLException {
        if (rs.getObject(index) != null) {
            return rs.getBoolean(index);
        }/*  w ww  .  j av a2s  .co m*/

        throw new RuntimeException("Null value in non-Nullable column");
    }
}

Related

  1. getBoolean(ResultSet res, String name)
  2. getBoolean(ResultSet resultSet, int columnIndex)
  3. getBoolean(ResultSet rs, String colName)
  4. getBoolean(ResultSet rs, String columnLabel)
  5. getBoolean(ResultSet rs, String columnName)
  6. getBoolean(ResultSet rs, String name)