public static void close(Clob x) { if (x == null) { return; } try { x.free(); } catch (Exception e) { LOG.debug("close error", e); } }
@Override public void close() { for (Blob blob : this.temporaryBlobs) { try { blob.free(); } catch (SQLException ex) { logger.warn("Could not free BLOB", ex); } } for (Clob clob : this.temporaryClobs) { try { clob.free(); } catch (SQLException ex) { logger.warn("Could not free CLOB", ex); } } }
private static void doClobFree(Clob clob) throws SQLException { try { clob.free(); } catch (AbstractMethodError e) { // JTS driver do not implement free() as it's using JDBC 3.0 } }
@Override public void clob_free(ClobProxy clob) throws SQLException { if (this.pos < filterSize) { nextFilter().clob_free(this, clob); return; } clob.getRawClob().free(); }
Clob clob = rs.getClob(i); provider.defaultSerializeValue(clob.getCharacterStream(), jgen); clob.free(); break;
for ( Clob clob : clobs ) { try { clob.free();
clob.free(); } else { rec.put(i - 1, null);
@Test public void testLobCreation() throws SQLException { Session session = sessionFactory().getCurrentSession(); session.beginTransaction(); Blob blob = Hibernate.getLobCreator( session ).createBlob( new byte[] {} ); blob.free(); Clob clob = Hibernate.getLobCreator( session ).createClob( "Steve" ); clob.free(); session.getTransaction().commit(); assertFalse( session.isOpen() ); }
@Override public void close() throws IOException { try { reader.close(); } finally { try { clob.free(); } catch (SQLException e) { log.debug(e.getMessage()); } } }
public static void close(Clob x) { if (x == null) { return; } try { x.free(); } catch (Exception e) { LOG.debug("close error", e); } }
/** * Returns the String of a {@link Clob} and frees the clob resource. * * @param c * @return */ private static String toString(Clob c) { try { Reader reader = c.getCharacterStream(); String result = IOUtils.toString(reader); reader.close(); c.free(); return result; } catch (IOException e) { throw new RuntimeException(e); } catch (SQLException e) { throw new SQLRuntimeException(e); } }
private CorpusDocument getDocumentFromResultSet(ResultSet rs) throws Exception { CorpusDocument doc; int key = rs.getInt(1); String dId = rs.getString(2); String sId = rs.getString(3); Timestamp sourceDate = rs.getTimestamp(4); Timestamp processDate = rs.getTimestamp(5); Clob clob = rs.getClob(6); String content = readClob(clob); clob.free(); doc = new CorpusDocument( dId, sId, content, sourceDate == null ? null : sourceDate.toLocalDateTime(), processDate == null ? null : processDate.toLocalDateTime() ); doc.setKey(key); return doc; }
clobVal.free(); } catch (Throwable ignore) {
@Override public void clob_free(ClobProxy clob) throws SQLException { if (this.pos < filterSize) { nextFilter().clob_free(this, clob); return; } clob.getRawClob().free(); }
} finally { try { clob.free(); } catch (final Exception e) { // Some drivers dose not implement free(), for example, jtds LOGGER.log(Level.ERROR, "clob.free error", e);
@Override public Void call() throws SQLException { clob.free(); return null; } });
public static void close(Clob x) { if (x == null) { return; } try { x.free(); } catch (Exception e) { e.printStackTrace(); } }
@Override public void close() throws IOException { try { reader.close(); } finally { try { clob.free(); } catch (SQLException e) { log.debug(e.getMessage()); } } }
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(); }