Java SQL ResultSet Close close(Connection connection, Statement statement, ResultSet resultSet)

Here you can find the source of close(Connection connection, Statement statement, ResultSet resultSet)

Description

close

License

Open Source License

Declaration

private static void close(Connection connection, Statement statement, ResultSet resultSet) throws SQLException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.*;

public class Main {
    private static void close(Connection connection, Statement statement, ResultSet resultSet) throws SQLException {

        if (resultSet != null) {
            resultSet.close();/*from   w ww.j a  v  a  2s.com*/
        }

        if (statement != null) {
            statement.close();
        }

        if (connection != null) {
            connection.close();
        }
    }

    private void close(Statement statement, ResultSet resultSet) throws SQLException {
        close(null, statement, resultSet);
    }
}

Related

  1. close(Connection con, Statement stmt, ResultSet rs)
  2. close(Connection conn, PreparedStatement ps, ResultSet rs)
  3. close(Connection conn, Statement st, ResultSet rs)
  4. close(Connection conn, Statement st, ResultSet rs)
  5. close(Connection connection, PreparedStatement statement, ResultSet resultSet)
  6. close(final PreparedStatement ps, final ResultSet rs)
  7. close(final ResultSet rs, final Statement st)
  8. close(ResultSet _rsData, Logger _logger)
  9. close(ResultSet resultSet)