List of utility methods to do SQL PreparedStatement
void | addBatch(PreparedStatement prepStmt) add Batch try { prepStmt.addBatch(); } catch (SQLException sqle) { sqle.getNextException().printStackTrace(); throw new RuntimeException(sqle); |
void | addValuesToPreparedStatement(PreparedStatement preparedStatement, List values) add Values To Prepared Statement int i = 1; for (Iterator iter = values.iterator(); iter.hasNext(); i++) { Object paramValue = iter.next(); preparedStatement.setObject(i, paramValue); |
void | close(PreparedStatement preparedStatement) close close(null, preparedStatement, null, null); |
void | close(PreparedStatement stat) close try { if (null != stat) stat.close(); } catch (SQLException e) { e.printStackTrace(); |
void | closePreparedStatement(Map psMap) close Prepared Statement for (Iterator itr = psMap.values().iterator(); itr.hasNext();) {
Object[] obj = (Object[]) itr.next();
((PreparedStatement) obj[1]).close();
|
void | closePreparedStatement(PreparedStatement pstmt) close Prepared Statement if (pstmt != null) { try { pstmt.close(); } catch (SQLException e) { e.printStackTrace(); pstmt = null; |
void | closePreparedStatement(Statement ps) close Prepared Statement try { if (ps != null) ps.close(); } catch (SQLException e) { e.printStackTrace(); |
void | closePS(PreparedStatement argPreparedStatement) Closes the given prepared statement. if (argPreparedStatement != null) {
argPreparedStatement.close();
|
void | closeSilentlyPreparedStatement(PreparedStatement stmt) Closes a PreparedStatement silently (no exception raised). try { stmt.close(); } catch (SQLException e) { |
void | closeStatement(PreparedStatement preparedStatement) Method to close the PreparedStatement if (preparedStatement != null) { try { preparedStatement.close(); } catch (SQLException exception) { exception.printStackTrace(); |