use of com.liferay.portlet.asset.service.persistence.AssetEntryQuery in project liferay-ide by liferay.
the class KBArticleAssetEntriesUtil method getAssetEntries.
public static List<AssetEntry> getAssetEntries(long[] groupIds, long[] classNameIds, long[] assetTagIds, long resourcePrimKey, int start, int end, String orderByColumn) throws PortalException, SystemException {
AssetEntryQuery assetEntryQuery = new AssetEntryQuery();
assetEntryQuery.setAnyTagIds(assetTagIds);
assetEntryQuery.setClassNameIds(classNameIds);
assetEntryQuery.setEnd(end + 1);
assetEntryQuery.setGroupIds(groupIds);
assetEntryQuery.setOrderByCol1(orderByColumn);
assetEntryQuery.setStart(start);
List<AssetEntry> assetEntries = ListUtil.copy(AssetEntryServiceUtil.getEntries(assetEntryQuery));
AssetEntry assetEntry = null;
for (AssetEntry curAssetEntry : assetEntries) {
if (curAssetEntry.getClassPK() == resourcePrimKey) {
assetEntry = curAssetEntry;
}
}
assetEntries.remove(assetEntry);
return ListUtil.subList(assetEntries, 0, 10);
}
Aggregations