Java SQL ResultSet isResultEmpty(ResultSet theResult)

Here you can find the source of isResultEmpty(ResultSet theResult)

Description

is Result Empty

License

Open Source License

Declaration

protected static boolean isResultEmpty(ResultSet theResult) throws SQLException 

Method Source Code

//package com.java2s;
/**//from www.ja v a2 s. c  o  m
 * ClarescoExperienceAPI
 * Copyright 
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * Please contact Claresco, www.claresco.com, if you have any questions.
 **/

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

public class Main {
    protected static boolean isResultEmpty(ResultSet theResult) throws SQLException {
        if (!theResult.isBeforeFirst()) {
            return true;
        }
        return false;
    }
}

Related

  1. extractResultSetFiledNames(ResultSet result)
  2. fillRowNames(Map metaData, ResultSet rs)
  3. hasCompleted(ResultSet rs)
  4. hasGeometryField(ResultSet resultSet)
  5. isNull(ResultSet rs, String name)
  6. isReturnsInvalidResultSetException(SQLException se)
  7. isSupportedResultSetType(Connection connection, int resultSetType)
  8. loadListMap(final ResultSet rs)
  9. logCurrentResultSetRow(Log log, String msg, ResultSet rs)