Java JDBC Connection Close close(Object obj)

Here you can find the source of close(Object obj)

Description

close

License

Open Source License

Declaration

private static void close(Object obj) 

Method Source Code

//package com.java2s;

import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class Main {
    private static void close(Object obj) {
        if (obj instanceof ResultSet) {
            try {
                ((ResultSet) obj).close();
            } catch (Exception e) {
            }/*from   w  ww.j  a  v a2  s.c  om*/
        }
        if (obj instanceof PreparedStatement) {
            try {
                ((PreparedStatement) obj).close();
            } catch (Exception e) {
            }
        }
    }
}

Related

  1. close(Connection connection)
  2. close(Connection connection)
  3. close(Connection connection)
  4. close(Connection connection)
  5. close(Connection rs)
  6. closeConnection(Closeable... closes)
  7. closeIfNotNull(Connection conn)
  8. closeJDBC(Object obj)
  9. ClosePhase(long phaseId, Connection con)