List of usage examples for com.liferay.portal.kernel.service UserNotificationEventLocalServiceUtil getArchivedUserNotificationEventsCount
public static int getArchivedUserNotificationEventsCount(long userId, int deliveryType, boolean actionRequired, boolean archived)
From source file:com.liferay.notifications.web.internal.util.NotificationsUtil.java
License:Open Source License
public static void populateResults(long userId, boolean actionRequired, String navigation, String orderByType, SearchContainer<UserNotificationEvent> searchContainer) throws PortalException { OrderByComparator<UserNotificationEvent> obc = new UserNotificationEventTimestampComparator( orderByType.equals("asc")); if (navigation.equals("all")) { searchContainer.setTotal(UserNotificationEventLocalServiceUtil .getDeliveredUserNotificationEventsCount(userId, _DELIVERY_TYPE, true, actionRequired)); searchContainer.setResults(/* w w w . j av a 2 s. c o m*/ UserNotificationEventLocalServiceUtil.getDeliveredUserNotificationEvents(userId, _DELIVERY_TYPE, true, actionRequired, searchContainer.getStart(), searchContainer.getEnd(), obc)); } else { boolean archived = false; if (navigation.equals("read")) { archived = true; } searchContainer.setTotal(UserNotificationEventLocalServiceUtil .getArchivedUserNotificationEventsCount(userId, _DELIVERY_TYPE, actionRequired, archived)); searchContainer.setResults( UserNotificationEventLocalServiceUtil.getArchivedUserNotificationEvents(userId, _DELIVERY_TYPE, actionRequired, archived, searchContainer.getStart(), searchContainer.getEnd(), obc)); } }