/** * Overrides, in order to store recentSequences. * * @param c the Connection * @return an Integer * @throws SQLException if an error occurs */ @Override protected Integer getSerialWithConnection(Connection c) throws SQLException { Integer retval = super.getSerialWithConnection(c); recentSequences.put(retval, Boolean.TRUE); return retval; }
/** * Overrides, in order to store recentSequences. * * @param c the Connection * @return an Integer * @throws SQLException if an error occurs */ @Override protected Integer getSerialWithConnection(Connection c) throws SQLException { Integer retval = super.getSerialWithConnection(c); recentSequences.put(retval, Boolean.TRUE); return retval; }
/** * Gets an ID number which is unique in the database. * * @return an Integer * @throws ObjectStoreException if a problem occurs */ public Integer getSerial() throws ObjectStoreException { try { Connection c = null; try { c = getConnection(); return getSerialWithConnection(c); } finally { releaseConnection(c); } } catch (SQLException e) { throw new ObjectStoreException("Error generating serial number", e); } }
/** * Gets an ID number which is unique in the database. * * @return an Integer * @throws ObjectStoreException if a problem occurs */ public Integer getSerial() throws ObjectStoreException { try { Connection c = null; try { c = getConnection(); return getSerialWithConnection(c); } finally { releaseConnection(c); } } catch (SQLException e) { throw new ObjectStoreException("Error generating serial number", e); } }