Package com.liferay.samples.portlet.eventlisting.model.impl

Examples of com.liferay.samples.portlet.eventlisting.model.impl.EventModelImpl


    throws SystemException {
    event = toUnwrappedModel(event);

    boolean isNew = event.isNew();

    EventModelImpl eventModelImpl = (EventModelImpl)event;

    Session session = null;

    try {
      session = openSession();

      if (event.isNew()) {
        session.save(event);

        event.setNew(false);
      }
      else {
        session.merge(event);
      }
    }
    catch (Exception e) {
      throw processException(e);
    }
    finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !EventModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    else {
      if ((eventModelImpl.getColumnBitmask() &
          FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) {
        Object[] args = new Object[] { eventModelImpl.getOriginalGroupId() };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID,
          args);

        args = new Object[] { eventModelImpl.getGroupId() };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID,
          args);
      }
View Full Code Here

TOP

Related Classes of com.liferay.samples.portlet.eventlisting.model.impl.EventModelImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.