Package com.liferay.portal.kernel.dao.orm

Examples of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery


    expandoBridge.setAttribute(attributeName, Boolean.TRUE, false);

    CompanyLocalServiceUtil.updateCompany(company);

    ActionableDynamicQuery actionableDynamicQuery =
      new UserActionableDynamicQuery() {

      @Override
      protected void addCriteria(DynamicQuery dynamicQuery) {
        Property property = PropertyFactoryUtil.forName("createDate");

        dynamicQuery.add(property.eqProperty("modifiedDate"));
      }

      @Override
      protected void performAction(Object object)
        throws PortalException, SystemException {

        User user = (User)object;

        user.setModifiedDate(new Date());
        user.setLanguageId(PortletPropsValues.COMPANY_DEFAULT_LOCALE);
        user.setTimeZoneId(
          PortletPropsValues.COMPANY_DEFAULT_TIME_ZONE);

        UserLocalServiceUtil.updateUser(user);
      }

    };

    actionableDynamicQuery.setCompanyId(companyId);

    actionableDynamicQuery.performActions();
  }
View Full Code Here


  protected void reindexEntries(long companyId) throws PortalException,
      SystemException {

    final Collection<Document> documents = new ArrayList<Document>();

    ActionableDynamicQuery actionableDynamicQuery = new GuestbookActionableDynamicQuery() {

      @Override
      protected void addCriteria(DynamicQuery dynamicQuery) {
      }

      @Override
      protected void performAction(Object object) throws PortalException {
        Guestbook guestbook = (Guestbook) object;

        Document document = getDocument(guestbook);

        documents.add(document);
      }

    };

    actionableDynamicQuery.setCompanyId(companyId);

    actionableDynamicQuery.performActions();

    SearchEngineUtil.updateDocuments(getSearchEngineId(), companyId,
        documents);
  }
View Full Code Here

  protected void reindexEntries(long companyId) throws PortalException,
      SystemException {

    final Collection<Document> documents = new ArrayList<Document>();

    ActionableDynamicQuery actionableDynamicQuery = new EntryActionableDynamicQuery() {

      @Override
      protected void addCriteria(DynamicQuery dynamicQuery) {
      }

      @Override
      protected void performAction(Object object) throws PortalException {
        Entry entry = (Entry) object;

        Document document = getDocument(entry);

        documents.add(document);
      }

    };

    actionableDynamicQuery.setCompanyId(companyId);

    actionableDynamicQuery.performActions();

    SearchEngineUtil.updateDocuments(getSearchEngineId(), companyId,
        documents);
  }
View Full Code Here

TOP

Related Classes of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery

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.