141142143144145146147148
cpe = CpeMemoryIndex.getInstance(); try { cpe.open(cve); } catch (IndexException ex) { LOGGER.log(Level.FINE, "IndexException", ex); throw new DatabaseException(ex); } }
535455565758596061626364656667
ResultSet rs = null; int id = 0; try { rs = statement.getGeneratedKeys(); if (!rs.next()) { throw new DatabaseException("Unable to get primary key for inserted row"); } id = rs.getInt(1); } catch (SQLException ex) { throw new DatabaseException("Unable to get primary key for inserted row"); } finally { closeResultSet(rs); } return id; }