/**
	 * Adds the message to the database. Also notifies the appropriate model listeners.
	 *
	 * @param message the message
	 * @return the message that was added
	 */
	@Indexable(type = IndexableType.REINDEX)
	@Override
	public Message addMessage(Message message) {
		message.setNew(true);

		return messagePersistence.update(message);
	}
  /**
   * Adds the message to the database. Also notifies the appropriate model listeners.
   *
   * @param message the message
   * @return the message that was added
   * @throws SystemException if a system exception occurred
   */
  public Message addMessage(Message message) throws SystemException {
    message.setNew(true);

    message = messagePersistence.update(message, false);

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

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

    return message;
  }
  /**
   * Adds the message to the database. Also notifies the appropriate model listeners.
   *
   * @param message the message
   * @return the message that was added
   * @throws SystemException if a system exception occurred
   */
  @Indexable(type = IndexableType.REINDEX)
  public Message addMessage(Message message) throws SystemException {
    message.setNew(true);

    return messagePersistence.update(message);
  }