Class TaskViewCriteria
java.lang.Object
com.aquima.interactions.process.dao.dto.TaskViewCriteria
Encapsulates the criteria for querying task views. Criteria include:
- what data to include in the returned views (projection)
- what filtering to do (selection)
- how to sort the results (ordering)
- whether to apply pagination, which page to retrieve and how big a page should be (pagination)
- Since:
- 9.9
- Author:
- Petru Galanton
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default paging size if not otherwise specified. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a TaskViewCriteria which does not take into account ignore mode settings.TaskViewCriteria
(IIgnoreModeSettings ignoreModeSettings) Creates a TaskViewCriteria with the specified ignore mode settings, no limit, total counting enabled, paging size of 5 and record start 0.TaskViewCriteria
(IIgnoreModeSettings ignoreModeSettings, int pagingSize, int recordStart, boolean countTotal) TaskViewCriteria
(IIgnoreModeSettings ignoreModeSettings, int pagingSize, int recordStart, boolean countTotal, int limit) Creates a TaskViewCriteria. -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(TypedAttributeReference attribute) addCustomField
(String customField) addFilter
(IViewFilter filter) addOrder
(ProcessViewOrder order) addTaskProperty
(TaskProperty taskProperty) String[]
Returns the effective Application ID ignore mode, based on what Application ID has been set and the ignore mode settings.Returns the current language.int
getLimit()
getOrder()
int
int
getUser()
boolean
boolean
hasLimit()
boolean
hasTaskProperty
(TaskProperty taskProperty) boolean
Indicates whether this criteria contains a user-set filter.boolean
Indicates whether checking for restricted users is enabled in this criteria.boolean
setApplicationId
(ApplicationID appId) setLanguage
(ILanguage language) setLimit
(int limit) setPagingSize
(int pagingSize) setRecordStart
(int start) setRestrictedUsersEnabled
(boolean enabled) Sets whether the checking for restricted users is enabled.setTotalRequested
(boolean countTotal)
-
Field Details
-
DEFAULT_PAGING_SIZE
public static final int DEFAULT_PAGING_SIZEThe default paging size if not otherwise specified.- See Also:
-
-
Constructor Details
-
TaskViewCriteria
public TaskViewCriteria()Creates a TaskViewCriteria which does not take into account ignore mode settings. Equivalent toTaskViewCriteria(null)
-
TaskViewCriteria
Creates a TaskViewCriteria with the specified ignore mode settings, no limit, total counting enabled, paging size of 5 and record start 0.- Parameters:
ignoreModeSettings
- the ignore mode settings which control the application ID filter
-
TaskViewCriteria
public TaskViewCriteria(IIgnoreModeSettings ignoreModeSettings, int pagingSize, int recordStart, boolean countTotal) -
TaskViewCriteria
public TaskViewCriteria(IIgnoreModeSettings ignoreModeSettings, int pagingSize, int recordStart, boolean countTotal, int limit) Creates a TaskViewCriteria.- Parameters:
ignoreModeSettings
- the ignore mode settings which control the Application ID filterpagingSize
- the paging sizerecordStart
- the record to startcountTotal
- whether counting total results is requestedlimit
- the applicable limit (values <= 0 indicate no limit)
-
-
Method Details
-
getPagingSize
public int getPagingSize() -
setPagingSize
-
getRecordStart
public int getRecordStart() -
setRecordStart
-
hasLimit
public boolean hasLimit() -
getLimit
public int getLimit() -
setLimit
-
addFilter
-
getFilters
-
setApplicationId
-
getIgnoreMode
Returns the effective Application ID ignore mode, based on what Application ID has been set and the ignore mode settings.- Returns:
- the current effective ignore mode
-
isRestrictedUsersEnabled
public boolean isRestrictedUsersEnabled()Indicates whether checking for restricted users is enabled in this criteria.- Returns:
- true if checking for restricted users is enabled, false otherwise.
-
setRestrictedUsersEnabled
Sets whether the checking for restricted users is enabled. Checking for restriced users is enabled by default.When checking for restriced users is enabled, tasks which are restricted by an authorization algorithm's 2-man rule will not be returned in the results.
- Parameters:
enabled
- whether to enable checking for restriced users- Returns:
- this criteria
-
addTaskProperty
-
getTaskProperties
-
hasTaskProperty
-
addCustomField
-
getCustomFields
-
addAttribute
-
getAttributes
-
addOrder
-
getOrder
-
getUser
-
setUser
-
hasUserFilters
public boolean hasUserFilters()Indicates whether this criteria contains a user-set filter.- Returns:
- true if a user-set filter is present in this criteria, false otherwise.
-
isTotalRequested
public boolean isTotalRequested() -
setTotalRequested
-
getLanguage
Returns the current language.- Returns:
- The language, may be
null
.
-
setLanguage
-
hasLanguage
public boolean hasLanguage()
-