Package com.liferay.docs.guestbook.model.impl

Examples of com.liferay.docs.guestbook.model.impl.EntryModelImpl


      FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args,
        Long.valueOf(1));
      FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, entry);
    }
    else {
      EntryModelImpl entryModelImpl = (EntryModelImpl)entry;

      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) {
        Object[] args = new Object[] { entry.getUuid(), entry.getGroupId() };

        FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args,
          Long.valueOf(1));
View Full Code Here


      }
    }
  }

  protected void clearUniqueFindersCache(Entry entry) {
    EntryModelImpl entryModelImpl = (EntryModelImpl)entry;

    Object[] args = new Object[] { entry.getUuid(), entry.getGroupId() };

    FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args);
    FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args);

    if ((entryModelImpl.getColumnBitmask() &
        FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) {
      args = new Object[] {
          entryModelImpl.getOriginalUuid(),
          entryModelImpl.getOriginalGroupId()
        };

      FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args);
      FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args);
    }
View Full Code Here

    throws SystemException {
    entry = toUnwrappedModel(entry);

    boolean isNew = entry.isNew();

    EntryModelImpl entryModelImpl = (EntryModelImpl)entry;

    if (Validator.isNull(entry.getUuid())) {
      String uuid = PortalUUIDUtil.generate();

      entry.setUuid(uuid);
    }

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

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

    else {
      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) {
        Object[] args = new Object[] { entryModelImpl.getOriginalUuid() };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID,
          args);

        args = new Object[] { entryModelImpl.getUuid() };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID,
          args);
      }

      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {
            entryModelImpl.getOriginalUuid(),
            entryModelImpl.getOriginalCompanyId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C,
          args);

        args = new Object[] {
            entryModelImpl.getUuid(), entryModelImpl.getCompanyId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C,
          args);
      }

      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {
            entryModelImpl.getOriginalGroupId(),
            entryModelImpl.getOriginalGuestbookId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_G, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G,
          args);

        args = new Object[] {
            entryModelImpl.getGroupId(),
            entryModelImpl.getGuestbookId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_G, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G,
          args);
View Full Code Here

      FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args,
        Long.valueOf(1));
      FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, entry);
    }
    else {
      EntryModelImpl entryModelImpl = (EntryModelImpl)entry;

      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) {
        Object[] args = new Object[] { entry.getUuid(), entry.getGroupId() };

        FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args,
          Long.valueOf(1));
View Full Code Here

      }
    }
  }

  protected void clearUniqueFindersCache(Entry entry) {
    EntryModelImpl entryModelImpl = (EntryModelImpl)entry;

    Object[] args = new Object[] { entry.getUuid(), entry.getGroupId() };

    FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args);
    FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args);

    if ((entryModelImpl.getColumnBitmask() &
        FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) {
      args = new Object[] {
          entryModelImpl.getOriginalUuid(),
          entryModelImpl.getOriginalGroupId()
        };

      FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args);
      FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args);
    }
View Full Code Here

    throws SystemException {
    entry = toUnwrappedModel(entry);

    boolean isNew = entry.isNew();

    EntryModelImpl entryModelImpl = (EntryModelImpl)entry;

    if (Validator.isNull(entry.getUuid())) {
      String uuid = PortalUUIDUtil.generate();

      entry.setUuid(uuid);
    }

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

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

    else {
      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) {
        Object[] args = new Object[] { entryModelImpl.getOriginalUuid() };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID,
          args);

        args = new Object[] { entryModelImpl.getUuid() };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID,
          args);
      }

      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {
            entryModelImpl.getOriginalUuid(),
            entryModelImpl.getOriginalCompanyId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C,
          args);

        args = new Object[] {
            entryModelImpl.getUuid(), entryModelImpl.getCompanyId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C,
          args);
      }

      if ((entryModelImpl.getColumnBitmask() &
          FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {
            entryModelImpl.getOriginalGroupId(),
            entryModelImpl.getOriginalGuestbookId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_G, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G,
          args);

        args = new Object[] {
            entryModelImpl.getGroupId(),
            entryModelImpl.getGuestbookId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_G, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G,
          args);
View Full Code Here

TOP

Related Classes of com.liferay.docs.guestbook.model.impl.EntryModelImpl

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.