Java SQL ResultSet isNull(ResultSet rs, String name)

Here you can find the source of isNull(ResultSet rs, String name)

Description

is Null

License

Apache License

Declaration

public static boolean isNull(ResultSet rs, String name) throws SQLException 

Method Source Code

//package com.java2s;
/*/*from w  w w .  j av a  2s  .  co m*/
 * Copyright 2012 Andy Boothe
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

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

public class Main {
    public static boolean isNull(ResultSet rs, String name) throws SQLException {
        rs.getObject(name);
        return rs.wasNull();
    }
}

Related

  1. extractResults(ResultSet resultSet)
  2. extractResultSetFiledNames(ResultSet result)
  3. fillRowNames(Map metaData, ResultSet rs)
  4. hasCompleted(ResultSet rs)
  5. hasGeometryField(ResultSet resultSet)
  6. isResultEmpty(ResultSet theResult)
  7. isReturnsInvalidResultSetException(SQLException se)
  8. isSupportedResultSetType(Connection connection, int resultSetType)
  9. loadListMap(final ResultSet rs)