/**
   * Adds the j i r a change group to the database. Also notifies the appropriate model listeners.
   *
   * @param jiraChangeGroup the j i r a change group
   * @return the j i r a change group that was added
   * @throws SystemException if a system exception occurred
   */
  public JIRAChangeGroup addJIRAChangeGroup(JIRAChangeGroup jiraChangeGroup)
      throws SystemException {
    jiraChangeGroup.setNew(true);

    jiraChangeGroup = jiraChangeGroupPersistence.update(jiraChangeGroup, false);

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

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

    return jiraChangeGroup;
  }