@Override
  protected HROffice removeImpl(HROffice hrOffice) throws SystemException {
    hrOffice = toUnwrappedModel(hrOffice);

    try {
      clearHRHolidaies.clear(hrOffice.getPrimaryKey());
    } catch (Exception e) {
      throw processException(e);
    } finally {
      FinderCacheUtil.clearCache(HROfficeModelImpl.MAPPING_TABLE_HRHOLIDAYS_HROFFICES_NAME);
    }

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, hrOffice);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.removeResult(
        HROfficeModelImpl.ENTITY_CACHE_ENABLED, HROfficeImpl.class, hrOffice.getPrimaryKey());

    return hrOffice;
  }
  @Override
  public ListType updateImpl(ListType listType) {
    listType = toUnwrappedModel(listType);

    boolean isNew = listType.isNew();

    ListTypeModelImpl listTypeModelImpl = (ListTypeModelImpl) listType;

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !ListTypeModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((listTypeModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TYPE.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {listTypeModelImpl.getOriginalType()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TYPE, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TYPE, args);

        args = new Object[] {listTypeModelImpl.getType()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_TYPE, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_TYPE, args);
      }
    }

    EntityCacheUtil.putResult(
        ListTypeModelImpl.ENTITY_CACHE_ENABLED,
        ListTypeImpl.class,
        listType.getPrimaryKey(),
        listType,
        false);

    clearUniqueFindersCache(listType);
    cacheUniqueFindersCache(listType);

    listType.resetOriginalValues();

    return listType;
  }
  @Override
  public Faculty updateImpl(
      com.asu.poly.teams.manualSelect.slayer.model.Faculty faculty, boolean merge)
      throws SystemException {
    faculty = toUnwrappedModel(faculty);

    boolean isNew = faculty.isNew();

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, faculty, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(
        FacultyModelImpl.ENTITY_CACHE_ENABLED, FacultyImpl.class, faculty.getPrimaryKey(), faculty);

    return faculty;
  }
  @Override
  public iProject updateImpl(com.asu.poly.iProjects.model.iProject iProject, boolean merge)
      throws SystemException {
    iProject = toUnwrappedModel(iProject);

    boolean isNew = iProject.isNew();

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, iProject, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(
        iProjectModelImpl.ENTITY_CACHE_ENABLED,
        iProjectImpl.class,
        iProject.getPrimaryKey(),
        iProject);

    return iProject;
  }
  @Override
  public JIRAChangeItem updateImpl(com.liferay.socialcoding.model.JIRAChangeItem jiraChangeItem)
      throws SystemException {
    jiraChangeItem = toUnwrappedModel(jiraChangeItem);

    boolean isNew = jiraChangeItem.isNew();

    JIRAChangeItemModelImpl jiraChangeItemModelImpl = (JIRAChangeItemModelImpl) jiraChangeItem;

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !JIRAChangeItemModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((jiraChangeItemModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JIRACHANGEGROUPID.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {jiraChangeItemModelImpl.getOriginalJiraChangeGroupId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_JIRACHANGEGROUPID, args);
        FinderCacheUtil.removeResult(
            FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JIRACHANGEGROUPID, args);

        args = new Object[] {jiraChangeItemModelImpl.getJiraChangeGroupId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_JIRACHANGEGROUPID, args);
        FinderCacheUtil.removeResult(
            FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_JIRACHANGEGROUPID, args);
      }
    }

    EntityCacheUtil.putResult(
        JIRAChangeItemModelImpl.ENTITY_CACHE_ENABLED,
        JIRAChangeItemImpl.class,
        jiraChangeItem.getPrimaryKey(),
        jiraChangeItem,
        false);

    jiraChangeItem.resetOriginalValues();

    return jiraChangeItem;
  }
  @Override
  public Counter updateImpl(com.liferay.counter.model.Counter counter) throws SystemException {
    counter = toUnwrappedModel(counter);

    boolean isNew = counter.isNew();

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(
        CounterModelImpl.ENTITY_CACHE_ENABLED, CounterImpl.class, counter.getPrimaryKey(), counter);

    return counter;
  }
  @Override
  public Image updateImpl(com.liferay.portal.model.Image image) throws SystemException {
    image = toUnwrappedModel(image);

    boolean isNew = image.isNew();

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

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

    EntityCacheUtil.putResult(
        ImageModelImpl.ENTITY_CACHE_ENABLED, ImageImpl.class, image.getPrimaryKey(), image);

    return image;
  }
  @Override
  public Account updateImpl(com.liferay.portal.model.Account account) throws SystemException {
    account = toUnwrappedModel(account);

    boolean isNew = account.isNew();

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(
        AccountModelImpl.ENTITY_CACHE_ENABLED, AccountImpl.class, account.getPrimaryKey(), account);

    return account;
  }
  @Override
  public Quota updateImpl(org.lsug.quota.model.Quota quota, boolean merge) throws SystemException {
    quota = toUnwrappedModel(quota);

    boolean isNew = quota.isNew();

    QuotaModelImpl quotaModelImpl = (QuotaModelImpl) quota;

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, quota, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

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

    EntityCacheUtil.putResult(
        QuotaModelImpl.ENTITY_CACHE_ENABLED, QuotaImpl.class, quota.getPrimaryKey(), quota);

    if (isNew) {
      FinderCacheUtil.putResult(
          FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK,
          new Object[] {Long.valueOf(quota.getClassNameId()), Long.valueOf(quota.getClassPK())},
          quota);
    } else {
      if ((quotaModelImpl.getColumnBitmask()
              & FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK.getColumnBitmask())
          != 0) {
        Object[] args =
            new Object[] {
              Long.valueOf(quotaModelImpl.getOriginalClassNameId()),
              Long.valueOf(quotaModelImpl.getOriginalClassPK())
            };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CLASSNAMEIDCLASSPK, args);

        FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK, args);

        FinderCacheUtil.putResult(
            FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK,
            new Object[] {Long.valueOf(quota.getClassNameId()), Long.valueOf(quota.getClassPK())},
            quota);
      }
    }

    return quota;
  }
  /**
   * Clears the cache for all list types.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache() {
    EntityCacheUtil.clearCache(ListTypeImpl.class);

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  /**
   * Clears the cache for the i project.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(iProject iProject) {
    EntityCacheUtil.removeResult(
        iProjectModelImpl.ENTITY_CACHE_ENABLED, iProjectImpl.class, iProject.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  /**
   * Clears the cache for the faculty.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(Faculty faculty) {
    EntityCacheUtil.removeResult(
        FacultyModelImpl.ENTITY_CACHE_ENABLED, FacultyImpl.class, faculty.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  /**
   * Clears the cache for the bar.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(Bar bar) {
    EntityCacheUtil.removeResult(
        BarModelImpl.ENTITY_CACHE_ENABLED, BarImpl.class, bar.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
示例#14
0
  /**
   * Clears the cache for the list type.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(ListType listType) {
    EntityCacheUtil.removeResult(
        ListTypeModelImpl.ENTITY_CACHE_ENABLED, ListTypeImpl.class, listType.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  @Override
  public ProjectsEntry updateImpl(com.liferay.so.model.ProjectsEntry projectsEntry)
      throws SystemException {
    projectsEntry = toUnwrappedModel(projectsEntry);

    boolean isNew = projectsEntry.isNew();

    ProjectsEntryModelImpl projectsEntryModelImpl = (ProjectsEntryModelImpl) projectsEntry;

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !ProjectsEntryModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((projectsEntryModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {projectsEntryModelImpl.getOriginalUserId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, args);

        args = new Object[] {projectsEntryModelImpl.getUserId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, args);
      }
    }

    EntityCacheUtil.putResult(
        ProjectsEntryModelImpl.ENTITY_CACHE_ENABLED,
        ProjectsEntryImpl.class,
        projectsEntry.getPrimaryKey(),
        projectsEntry,
        false);

    projectsEntry.resetOriginalValues();

    return projectsEntry;
  }
  @Override
  public UserTrackerPath updateImpl(UserTrackerPath userTrackerPath) {
    userTrackerPath = toUnwrappedModel(userTrackerPath);

    boolean isNew = userTrackerPath.isNew();

    UserTrackerPathModelImpl userTrackerPathModelImpl = (UserTrackerPathModelImpl) userTrackerPath;

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !UserTrackerPathModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((userTrackerPathModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERTRACKERID.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {userTrackerPathModelImpl.getOriginalUserTrackerId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERTRACKERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERTRACKERID, args);

        args = new Object[] {userTrackerPathModelImpl.getUserTrackerId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERTRACKERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERTRACKERID, args);
      }
    }

    EntityCacheUtil.putResult(
        UserTrackerPathModelImpl.ENTITY_CACHE_ENABLED,
        UserTrackerPathImpl.class,
        userTrackerPath.getPrimaryKey(),
        userTrackerPath,
        false);

    userTrackerPath.resetOriginalValues();

    return userTrackerPath;
  }
  @Override
  public ShoppingItemField updateImpl(
      com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField)
      throws SystemException {
    shoppingItemField = toUnwrappedModel(shoppingItemField);

    boolean isNew = shoppingItemField.isNew();

    ShoppingItemFieldModelImpl shoppingItemFieldModelImpl =
        (ShoppingItemFieldModelImpl) shoppingItemField;

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !ShoppingItemFieldModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((shoppingItemFieldModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ITEMID.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {Long.valueOf(shoppingItemFieldModelImpl.getOriginalItemId())};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ITEMID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ITEMID, args);

        args = new Object[] {Long.valueOf(shoppingItemFieldModelImpl.getItemId())};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ITEMID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ITEMID, args);
      }
    }

    EntityCacheUtil.putResult(
        ShoppingItemFieldModelImpl.ENTITY_CACHE_ENABLED,
        ShoppingItemFieldImpl.class,
        shoppingItemField.getPrimaryKey(),
        shoppingItemField);

    return shoppingItemField;
  }
  @Override
  public EmpPersonalDetails updateImpl(
      com.rknowsys.eapp.hrm.model.EmpPersonalDetails empPersonalDetails) throws SystemException {
    empPersonalDetails = toUnwrappedModel(empPersonalDetails);

    boolean isNew = empPersonalDetails.isNew();

    EmpPersonalDetailsModelImpl empPersonalDetailsModelImpl =
        (EmpPersonalDetailsModelImpl) empPersonalDetails;

    Session session = null;

    try {
      session = openSession();

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

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !EmpPersonalDetailsModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((empPersonalDetailsModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_EMPLOYEEID.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {empPersonalDetailsModelImpl.getOriginalEmployeeId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_EMPLOYEEID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_EMPLOYEEID, args);

        args = new Object[] {empPersonalDetailsModelImpl.getEmployeeId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_EMPLOYEEID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_EMPLOYEEID, args);
      }
    }

    EntityCacheUtil.putResult(
        EmpPersonalDetailsModelImpl.ENTITY_CACHE_ENABLED,
        EmpPersonalDetailsImpl.class,
        empPersonalDetails.getPrimaryKey(),
        empPersonalDetails);

    return empPersonalDetails;
  }
  /**
   * Clears the cache for the entry.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(Entry entry) {
    EntityCacheUtil.removeResult(
        EntryModelImpl.ENTITY_CACHE_ENABLED, EntryImpl.class, entry.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

    clearUniqueFindersCache(entry);
  }
  /**
   * Clears the cache for the class name.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(ClassName className) {
    EntityCacheUtil.removeResult(
        ClassNameModelImpl.ENTITY_CACHE_ENABLED, ClassNameImpl.class, className.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

    clearUniqueFindersCache(className);
  }
  /**
   * Clears the cache for the user tracker path.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(UserTrackerPath userTrackerPath) {
    EntityCacheUtil.removeResult(
        UserTrackerPathModelImpl.ENTITY_CACHE_ENABLED,
        UserTrackerPathImpl.class,
        userTrackerPath.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  /**
   * Clears the cache for the panic button.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(PanicButton panicButton) {
    EntityCacheUtil.removeResult(
        PanicButtonModelImpl.ENTITY_CACHE_ENABLED,
        PanicButtonImpl.class,
        panicButton.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  /**
   * Clears the cache for the shopping item field.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(ShoppingItemField shoppingItemField) {
    EntityCacheUtil.removeResult(
        ShoppingItemFieldModelImpl.ENTITY_CACHE_ENABLED,
        ShoppingItemFieldImpl.class,
        shoppingItemField.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
示例#24
0
  /**
   * Clears the cache for the password tracker.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(PasswordTracker passwordTracker) {
    EntityCacheUtil.removeResult(
        PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
        PasswordTrackerImpl.class,
        passwordTracker.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  /**
   * Clears the cache for all tickets.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache() {
    if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) {
      CacheRegistryUtil.clear(TicketImpl.class.getName());
    }

    EntityCacheUtil.clearCache(TicketImpl.class.getName());
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
  }
  /**
   * Clears the cache for the shard.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(Shard shard) {
    EntityCacheUtil.removeResult(
        ShardModelImpl.ENTITY_CACHE_ENABLED, ShardImpl.class, shard.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

    clearUniqueFindersCache(shard);
  }
  /**
   * Clears the cache for the advertising.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(Advertising advertising) {
    EntityCacheUtil.removeResult(
        AdvertisingModelImpl.ENTITY_CACHE_ENABLED,
        AdvertisingImpl.class,
        advertising.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
  @Override
  public void clearCache(List<Image> images) {
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

    for (Image image : images) {
      EntityCacheUtil.removeResult(
          ImageModelImpl.ENTITY_CACHE_ENABLED, ImageImpl.class, image.getPrimaryKey());
    }
  }
  @Override
  public void clearCache(List<Asset> assets) {
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

    for (Asset asset : assets) {
      EntityCacheUtil.removeResult(
          AssetModelImpl.ENTITY_CACHE_ENABLED, AssetImpl.class, asset.getPrimaryKey());
    }
  }
  /**
   * Clears the cache for the tra cuu thu tuc hanh chinh.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(TraCuuThuTucHanhChinh traCuuThuTucHanhChinh) {
    EntityCacheUtil.removeResult(
        TraCuuThuTucHanhChinhModelImpl.ENTITY_CACHE_ENABLED,
        TraCuuThuTucHanhChinhImpl.class,
        traCuuThuTucHanhChinh.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }