Java SQL Callable Statement safeCallableStatementClose(CallableStatement call)

Here you can find the source of safeCallableStatementClose(CallableStatement call)

Description

Cierra de manera segura un CallableStatement , haciendo primero validacion de nulabilidad.

License

Open Source License

Parameter

Parameter Description
call El statement que se desea cerrar

Exception

Parameter Description
SQLException Si ocurre algun error al cerrar el statement.

Declaration

public static void safeCallableStatementClose(CallableStatement call)
        throws SQLException 

Method Source Code

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

import java.sql.CallableStatement;

import java.sql.SQLException;

public class Main {
    /**/*from   www  .j  a v  a 2 s .  co m*/
     * Cierra de manera segura un {@link CallableStatement}, haciendo primero validacion de nulabilidad.
     * 
     * @param call El statement que se desea cerrar
     * @throws SQLException Si ocurre algun error al cerrar el statement.
     */
    public static void safeCallableStatementClose(CallableStatement call)
            throws SQLException {
        if (call != null) {
            call.close();
        }
    }
}

Related

  1. getStringCallableStatement(CallableStatement cs, int intField)