@Override public Object map(ResultSet r, int columnNumber, StatementContext ctx) throws SQLException { java.sql.Array array = r.getArray(columnNumber); if (array == null) { return null; } try { return buildArray(array, ctx); } finally { array.free(); } }
@Override public R map(ResultSet r, int columnNumber, StatementContext ctx) throws SQLException { Array array = r.getArray(columnNumber); if (array == null) { return null; } try { return buildFromResultSet(array, ctx); } finally { array.free(); } }
protected Object extractArray(Array array) throws SQLException { if (array == null) { return null; } Object result = array.getArray(); array.free(); return result; }
@Override public Void call() throws SQLException { array.free(); return null; } });
@Override public void close(D database, Array array) throws SQLException { array.free(); }
@Override public C map(ResultSet r, int columnNumber, StatementContext ctx) throws SQLException { java.sql.Array array = r.getArray(columnNumber); if (array == null) { return null; } try { return buildFromResultSet(array, ctx); } finally { array.free(); } }
@Override public Object map(ResultSet r, int columnNumber, StatementContext ctx) throws SQLException { java.sql.Array array = r.getArray(columnNumber); if (array == null) { return null; } try { return buildArray(array, ctx); } finally { array.free(); } }
@Nullable @Override A getValue(@NotNull final ResultSet rset, final int index) throws SQLException { Array array = rset.getArray(index); if (array == null) return null; try { if (rset.wasNull()) return null; return convertArray(array); } finally { array.free(); } }
/** * Safely free an Array object. * <p> * This method will silently ignore if <code>array</code> is * <code>null</code>, or if {@link Array#free()} throws an exception. */ public static final void safeFree(Array array) { if (array != null) { try { array.free(); } catch (Exception ignore) { log.warn("Error while freeing resource", ignore); } // [#3069] The free() method was added only in JDBC 4.0 / Java 1.6 catch (AbstractMethodError ignore) {} } }
Array return_objs = ocs.getArray(1); Clob[] clobs = (Clob[]) return_objs.getArray(); return_objs.free(); for(int i = 0; i < clobs.length; i++ ) { //Utilize clob clobs[i].free(); }
array.free( );
final java.sql.Array array = (java.sql.Array) value; value = array.getArray(); array.free();
final java.sql.Array array = (java.sql.Array) value; value = array.getArray(); array.free();