code: protected int insertRecord(Connection connection, String hash)
              throws SQLException {
          int id = -1;
          PreparedStatement ps = setObjects(connection, Query.INSERT_RECORD, hash);
          ps.execute();
          ResultSet rs = ps.getGeneratedKeys();
          try {
              while (rs.next()) {
                  id = rs.getInt(1);
                  break;
              }
          } finally {
              rs.close();
              ps.close();
          }
  
          return id;
      }
docs: Insert a new record with the given hash and return the record id.
  
  @param hash
  @return A record id if it was created correctly, else return -1.
  @throws SQLException