コード例 #1
0
  /**
   * Adds the entry to the database. Also notifies the appropriate model listeners.
   *
   * @param entry the entry
   * @return the entry that was added
   */
  @Indexable(type = IndexableType.REINDEX)
  @Override
  public Entry addEntry(Entry entry) {
    entry.setNew(true);

    return entryPersistence.update(entry);
  }
コード例 #2
0
  /**
   * Adds the entry to the database. Also notifies the appropriate model listeners.
   *
   * @param entry the entry to add
   * @return the entry that was added
   * @throws SystemException if a system exception occurred
   */
  public Entry addEntry(Entry entry) throws SystemException {
    entry.setNew(true);

    return entryPersistence.update(entry, false);
  }
コード例 #3
0
  /**
   * Updates the entry in the database. Also notifies the appropriate model listeners.
   *
   * @param entry the entry to update
   * @param merge whether to merge the entry 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 entry that was updated
   * @throws SystemException if a system exception occurred
   */
  public Entry updateEntry(Entry entry, boolean merge) throws SystemException {
    entry.setNew(false);

    return entryPersistence.update(entry, merge);
  }