/**
   * Adds the user thread to the database. Also notifies the appropriate model listeners.
   *
   * @param userThread the user thread
   * @return the user thread that was added
   * @throws SystemException if a system exception occurred
   */
  public UserThread addUserThread(UserThread userThread) throws SystemException {
    userThread.setNew(true);

    userThread = userThreadPersistence.update(userThread, false);

    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());

    if (indexer != null) {
      try {
        indexer.reindex(userThread);
      } catch (SearchException se) {
        if (_log.isWarnEnabled()) {
          _log.warn(se, se);
        }
      }
    }

    return userThread;
  }