List of usage examples for com.liferay.portal.kernel.dao.search SearchContainer getPortletRequest
public PortletRequest getPortletRequest()
From source file:com.liferay.portlet.asset.service.persistence.AssetEntryQuery.java
License:Open Source License
public AssetEntryQuery(long[] classNameIds, SearchContainer<?> searchContainer) throws PortalException, SystemException { this();//w ww.j ava 2s . c o m setClassNameIds(classNameIds); _start = searchContainer.getStart(); _end = searchContainer.getEnd(); if (Validator.isNotNull(searchContainer.getOrderByCol())) { setOrderByCol1(searchContainer.getOrderByCol()); setOrderByType1(searchContainer.getOrderByType()); } PortletRequest portletRequest = searchContainer.getPortletRequest(); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); _groupIds = new long[] { themeDisplay.getScopeGroupId() }; long categoryId = ParamUtil.getLong(portletRequest, "categoryId"); if (categoryId > 0) { _allCategoryIds = new long[] { categoryId }; } String tagName = ParamUtil.getString(portletRequest, "tag"); if (Validator.isNotNull(tagName)) { _allTagIds = AssetTagLocalServiceUtil.getTagIds(themeDisplay.getParentGroupId(), new String[] { tagName }); } }