Package com.jalios.jcms.alert
Class AlertQueryBuilder
- java.lang.Object
 - 
- com.jalios.jcms.alert.AlertQueryBuilder
 
 
- 
public class AlertQueryBuilder extends java.lang.ObjectHelper to query Alerts.- Since:
 - jcms-10.0
 - Version:
 - $Revision: 114560 $
 - Author:
 - Sylvain Devaux
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAlertQueryBuilder.ReadModeReadMode represents the state of alert (Read, unread, read & unread) 
- 
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringRECIPIENT_EXCEPTION_EXPECTED_MESSAGEstatic java.lang.StringREVISION 
- 
Constructor Summary
Constructors Constructor Description AlertQueryBuilder()AlertQueryBuilder(AlertQueryBuilder other) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlertQueryBuilderauthor(Member author)Sets the author to filter on currentAlertQueryBuilderAlertQueryBuilderendDate(java.util.Calendar endCal)Sets the endDate to filter on currentAlertQueryBuilderAlertQueryBuilderendDate(java.util.Date endDate)Sets the endDate to filter on currentAlertQueryBuilderPageResult<Alert>getResults()Returns alert paginated resultintgetResultsCount()Count (without sorting and first/max criteria for performance reason)AlertQueryBuilderlevels(Alert.Level... levels)Sets the levels to filter on currentAlertQueryBuilderAlertQueryBuilderpagerAll(boolean pagerAll)Defines if all results should be displayed for currentAlertQueryBuildervoidpagerParams(PagerParams pagerParams)AlertQueryBuilderpageSize(int pageSize)Sets the page size on currentAlertQueryBuilderAlertQueryBuilderread(AlertQueryBuilder.ReadMode readMode)Sets the read mode to filter on currentAlertQueryBuilderAlertQueryBuilderrecipient(Member recipient)Sets the recipient to filter on currentAlertQueryBuilderAlertQueryBuilderreverse(boolean reverse)Defines if results have to be reversed on currentAlertQueryBuilderAlertQueryBuildersort(java.lang.String sort)Sets the sort on currentAlertQueryBuilderAlertQueryBuilderstart(int start)Sets the start (Index) on currentAlertQueryBuilderAlertQueryBuilderstartDate(java.util.Calendar startCal)Sets the startDate to filter on currentAlertQueryBuilderAlertQueryBuilderstartDate(java.util.Date startDate)Sets the startDate to filter on currentAlertQueryBuilderjava.lang.StringtoString()AlertQueryBuilderworkspace(Workspace workspace)Sets the workspace to filter on currentAlertQueryBuilder 
 - 
 
- 
- 
Field Detail
- 
REVISION
public static final java.lang.String REVISION
- See Also:
 - Constant Field Values
 
 
- 
RECIPIENT_EXCEPTION_EXPECTED_MESSAGE
protected static final java.lang.String RECIPIENT_EXCEPTION_EXPECTED_MESSAGE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
AlertQueryBuilder
public AlertQueryBuilder()
 
- 
AlertQueryBuilder
public AlertQueryBuilder(AlertQueryBuilder other)
 
 - 
 
- 
Method Detail
- 
getResultsCount
public int getResultsCount()
Count (without sorting and first/max criteria for performance reason)- Returns:
 - results count for current user filters
 - Throws:
 java.lang.IllegalArgumentException- if recipient is null
 
- 
getResults
public PageResult<Alert> getResults()
Returns alert paginated result- Returns:
 - results as a 
PageResultofAlert - Throws:
 java.lang.IllegalArgumentException- if recipient is null
 
- 
author
public AlertQueryBuilder author(Member author)
Sets the author to filter on currentAlertQueryBuilder- Parameters:
 author- theMemberauthor of the alert- Returns:
 - a reference to this object
 
 
- 
endDate
public AlertQueryBuilder endDate(java.util.Date endDate)
Sets the endDate to filter on currentAlertQueryBuilder- Parameters:
 endDate- theDate- Returns:
 - a reference to this object
 
 
- 
endDate
public AlertQueryBuilder endDate(java.util.Calendar endCal)
Sets the endDate to filter on currentAlertQueryBuilder- Parameters:
 endCal- theCalendar- Returns:
 - a reference to this object
 
 
- 
levels
public AlertQueryBuilder levels(Alert.Level... levels)
Sets the levels to filter on currentAlertQueryBuilder- Parameters:
 levels- the array ofAlert.Level- Returns:
 - a reference to this object
 
 
- 
recipient
public AlertQueryBuilder recipient(Member recipient)
Sets the recipient to filter on currentAlertQueryBuilder- Parameters:
 recipient- theMember- Returns:
 - a reference to this object
 
 
- 
read
public AlertQueryBuilder read(AlertQueryBuilder.ReadMode readMode)
Sets the read mode to filter on currentAlertQueryBuilder- Parameters:
 readMode- theAlertQueryBuilder.ReadMode- Returns:
 - a reference to this object
 
 
- 
startDate
public AlertQueryBuilder startDate(java.util.Date startDate)
Sets the startDate to filter on currentAlertQueryBuilder- Parameters:
 startDate- theDate- Returns:
 - a reference to this object
 
 
- 
startDate
public AlertQueryBuilder startDate(java.util.Calendar startCal)
Sets the startDate to filter on currentAlertQueryBuilder- Parameters:
 startCal- theCalendar- Returns:
 - a reference to this object
 
 
- 
workspace
public AlertQueryBuilder workspace(Workspace workspace)
Sets the workspace to filter on currentAlertQueryBuilder- Parameters:
 workspace- theWorkspace- Returns:
 - a reference to this object
 
 
- 
pagerParams
public void pagerParams(PagerParams pagerParams)
 
- 
sort
public AlertQueryBuilder sort(java.lang.String sort)
Sets the sort on currentAlertQueryBuilder- Parameters:
 sort- the chosen sort on current AlertQueryBuilder- Returns:
 - a reference to this object
 
 
- 
reverse
public AlertQueryBuilder reverse(boolean 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
public AlertQueryBuilder start(int start)
Sets the start (Index) on currentAlertQueryBuilder- Parameters:
 start- the first index- Returns:
 - a reference to this object
 
 
- 
pageSize
public AlertQueryBuilder pageSize(int pageSize)
Sets the page size on currentAlertQueryBuilder- Parameters:
 pageSize- the page size for returned PageResult- Returns:
 - a reference to this object
 
 
- 
pagerAll
public AlertQueryBuilder pagerAll(boolean 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
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -