Package com.jalios.jcms.alert
Class AlertQueryBuilder
java.lang.Object
com.jalios.jcms.alert.AlertQueryBuilder
Helper to query Alerts.
- Since:
- jcms-10.0
- Author:
- Sylvain Devaux
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumReadMode represents the state of alert (Read, unread, read & unread) -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the author to filter on currentAlertQueryBuilderdailyDate(boolean dailyDate) Sets the dailyDate to filter on currentAlertQueryBuilderSets the endDate to filter on currentAlertQueryBuilderSets the endDate to filter on currentAlertQueryBuilderReturns alert paginated resultintCount (without sorting and first/max criteria for performance reason)levels(Alert.Level... levels) Sets the levels to filter on currentAlertQueryBuilderpagerAll(boolean pagerAll) Defines if all results should be displayed for currentAlertQueryBuildervoidpagerParams(PagerParams pagerParams) pageSize(int pageSize) Sets the page size on currentAlertQueryBuilderread(AlertQueryBuilder.ReadMode readMode) Sets the read mode to filter on currentAlertQueryBuilderSets the recipient to filter on currentAlertQueryBuilderreverse(boolean reverse) Defines if results have to be reversed on currentAlertQueryBuilderSets the sort on currentAlertQueryBuilderstart(int start) Sets the start (Index) on currentAlertQueryBuilderSets the startDate to filter on currentAlertQueryBuilderSets the startDate to filter on currentAlertQueryBuildertoString()Sets the workspace to filter on currentAlertQueryBuilder
-
Field Details
-
RECIPIENT_EXCEPTION_EXPECTED_MESSAGE
- See Also:
-
-
Constructor Details
-
AlertQueryBuilder
public AlertQueryBuilder() -
AlertQueryBuilder
-
-
Method Details
-
getResultsCount
public int getResultsCount()Count (without sorting and first/max criteria for performance reason)- Returns:
- results count for current user filters
- Throws:
IllegalArgumentException- if recipient is null
-
getResults
Returns alert paginated result- Returns:
- results as a
PageResultofAlert - Throws:
IllegalArgumentException- if recipient is null
-
author
Sets the author to filter on currentAlertQueryBuilder- Parameters:
author- theMemberauthor of the alert- Returns:
- a reference to this object
-
endDate
Sets the endDate to filter on currentAlertQueryBuilder- Parameters:
endDate- theDate- Returns:
- a reference to this object
-
endDate
Sets the endDate to filter on currentAlertQueryBuilder- Parameters:
endCal- theCalendar- Returns:
- a reference to this object
-
levels
Sets the levels to filter on currentAlertQueryBuilder- Parameters:
levels- the array ofAlert.Level- Returns:
- a reference to this object
-
recipient
Sets the recipient to filter on currentAlertQueryBuilder- Parameters:
recipient- theMember- Returns:
- a reference to this object
-
read
Sets the read mode to filter on currentAlertQueryBuilder- Parameters:
readMode- theAlertQueryBuilder.ReadMode- Returns:
- a reference to this object
-
startDate
Sets the startDate to filter on currentAlertQueryBuilder- Parameters:
startDate- theDate- Returns:
- a reference to this object
-
startDate
Sets the startDate to filter on currentAlertQueryBuilder- Parameters:
startCal- theCalendar- Returns:
- a reference to this object
-
dailyDate
Sets the dailyDate to filter on currentAlertQueryBuilder- Parameters:
dailyDate- true if starDate and endDate must be processed as day-level Date- Returns:
- a reference to this object
-
workspace
Sets the workspace to filter on currentAlertQueryBuilder- Parameters:
workspace- theWorkspace- Returns:
- a reference to this object
-
pagerParams
-
sort
Sets the sort on currentAlertQueryBuilder- Parameters:
sort- the chosen sort on current AlertQueryBuilder- Returns:
- a reference to this object
-
reverse
Defines if results have to be reversed on currentAlertQueryBuilder- Parameters:
reverse- if true results order will be reversed- Returns:
- a reference to this object
-
start
Sets the start (Index) on currentAlertQueryBuilder- Parameters:
start- the first index- Returns:
- a reference to this object
-
pageSize
Sets the page size on currentAlertQueryBuilder- Parameters:
pageSize- the page size for returned PageResult- Returns:
- a reference to this object
-
pagerAll
Defines if all results should be displayed for currentAlertQueryBuilder- Parameters:
pagerAll- if true all results will be displayed- Returns:
- a reference to this object
-
toString
-