code: protected int insertUser (final User user)
          throws UserExistsException, PersistenceException
      {
          executeUpdate(new Operation<Object>() {
              public Object invoke (Connection conn, DatabaseLiaison liaison)
                  throws PersistenceException, SQLException
              {
                  try {
                      _utable.insert(conn, user);
                      // update the userid now that it's known
                      user.userId = liaison.lastInsertedId(conn, null, _utable.getName(), "userId");
                      // nothing to return
                      return null;
  
                  } catch (SQLException sqe) {
                      if (liaison.isDuplicateRowException(sqe)) {
                          throw new UserExistsException("error.user_exists");
                      } else {
                          throw sqe;
                      }
                  }
              }
          });
  
          return user.userId;
      }
docs: Inserts the supplied user record into the user database, assigning it a userid in the
  process, which is returned.