/**
   * Adds the message boards ban to the database. Also notifies the appropriate model listeners.
   *
   * @param mbBan the message boards ban
   * @return the message boards ban that was added
   * @throws SystemException if a system exception occurred
   */
  public MBBan addMBBan(MBBan mbBan) throws SystemException {
    mbBan.setNew(true);

    mbBan = mbBanPersistence.update(mbBan, false);

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

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

    return mbBan;
  }
  /**
   * Adds the message boards ban to the database. Also notifies the appropriate model listeners.
   *
   * @param mbBan the message boards ban to add
   * @return the message boards ban that was added
   * @throws SystemException if a system exception occurred
   */
  public MBBan addMBBan(MBBan mbBan) throws SystemException {
    mbBan.setNew(true);

    return mbBanPersistence.update(mbBan, false);
  }
  /**
   * Updates the message boards ban in the database. Also notifies the appropriate model listeners.
   *
   * @param mbBan the message boards ban to update
   * @param merge whether to merge the message boards ban with the current session. See {@link
   *     com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session,
   *     com.liferay.portal.model.BaseModel, boolean)} for an explanation.
   * @return the message boards ban that was updated
   * @throws SystemException if a system exception occurred
   */
  public MBBan updateMBBan(MBBan mbBan, boolean merge) throws SystemException {
    mbBan.setNew(false);

    return mbBanPersistence.update(mbBan, merge);
  }