List of usage examples for com.liferay.portal.kernel.dao.orm ActionableDynamicQuery setParallel
public void setParallel(boolean parallel);
From source file:com.liferay.calendar.web.internal.upgrade.v1_0_3.UpgradeEventsDisplayPortletId.java
License:Open Source License
@Override protected void updateInstanceablePortletPreferences(final String oldRootPortletId, final String newRootPortletId) throws Exception { ActionableDynamicQuery actionableDynamicQuery = _portletPreferencesLocalService.getActionableDynamicQuery(); actionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() { @Override/*from ww w .ja v a 2 s.c om*/ public void addCriteria(DynamicQuery dynamicQuery) { Junction junction = RestrictionsFactoryUtil.disjunction(); Property property = PropertyFactoryUtil.forName("portletId"); junction.add(property.eq(oldRootPortletId)); junction.add(property.like(oldRootPortletId + "_INSTANCE_%")); junction.add(property.like(oldRootPortletId + "_USER_%_INSTANCE_%")); dynamicQuery.add(junction); } }); actionableDynamicQuery.setParallel(true); actionableDynamicQuery .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<PortletPreferences>() { @Override public void performAction(PortletPreferences portletPreference) throws PortalException { updatePortletPreferences(portletPreference, oldRootPortletId, newRootPortletId); } }); actionableDynamicQuery.performActions(); }