/** * @throws SAXException if something goes wrong */ public void releaseResources() throws SAXException { if (stm != null) { try { stm.close(); } catch (SQLException sqle) { LOG.error("problems closing resources", sqle); } } ((ObjectStoreWriterInterMineImpl) osw).releaseConnection(connection); } }
/** * @throws SAXException if something goes wrong */ public void releaseResources() throws SAXException { if (stm != null) { try { stm.close(); } catch (SQLException sqle) { LOG.error("problems closing resources", sqle); } } ((ObjectStoreWriterInterMineImpl) osw).releaseConnection(connection); } }
/** * {@inheritDoc} */ @Override public void batchCommitTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); batchCommitTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void store(Object o) throws ObjectStoreException { Connection c = null; try { c = getConnection(); storeWithConnection(c, o); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void abortTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); abortTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void store(Object o) throws ObjectStoreException { Connection c = null; try { c = getConnection(); storeWithConnection(c, o); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void delete(InterMineObject o) throws ObjectStoreException { Connection c = null; try { c = getConnection(); deleteWithConnection(c, o); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void batchCommitTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); batchCommitTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void delete(QueryClass qc, Constraint c) throws ObjectStoreException { Connection con = null; try { con = getConnection(); deleteWithConnection(con, qc, c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(con); } }
/** * {@inheritDoc} */ @Override public void delete(InterMineObject o) throws ObjectStoreException { Connection c = null; try { c = getConnection(); deleteWithConnection(c, o); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void delete(QueryClass qc, Constraint c) throws ObjectStoreException { Connection con = null; try { con = getConnection(); deleteWithConnection(con, qc, c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(con); } }
/** * {@inheritDoc} */ @Override public void addToCollection(Integer hasId, Class<?> clazz, String fieldName, Integer hadId) throws ObjectStoreException { Connection c = null; try { c = getConnection(); addToCollectionWithConnection(c, hasId, clazz, fieldName, hadId); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public boolean isInTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); return isInTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void commitTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); commitTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public boolean isInTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); return isInTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void beginTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); beginTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void commitTransaction() throws ObjectStoreException { Connection c = null; try { c = getConnection(); commitTransactionWithConnection(c); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} */ @Override public void addToCollection(Integer hasId, Class<?> clazz, String fieldName, Integer hadId) throws ObjectStoreException { Connection c = null; try { c = getConnection(); addToCollectionWithConnection(c, hasId, clazz, fieldName, hadId); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
protected void tearDown() throws Exception { super.tearDown(); removeTracks(); ((ObjectStoreWriterInterMineImpl) uosw).releaseConnection(con); con.close(); uosw.close(); }
public void tearDown() throws Exception { deleteTrack(TrackerUtil.TEMPLATE_TRACKER_TABLE); deleteTrack(TrackerUtil.LOGIN_TRACKER_TABLE); deleteTrack(TrackerUtil.SEARCH_TRACKER_TABLE); deleteTrack(TrackerUtil.LIST_TRACKER_TABLE); ((ObjectStoreWriterInterMineImpl) uosw).releaseConnection(conn); if (conn != null) { conn.close(); } super.tearDown(); }