/** * {@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 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); } }