com.ibm.task.api

Class FilterOptions

  1. java.lang.Object
  2. extended bycom.ibm.task.api.FilterOptions
All implemented interfaces:
java.io.Serializable

  1. public final class FilterOptions
  2. extends java.lang.Object
  3. implements java.io.Serializable
Describes filtering options for a query against a query table. These options are additionally applied to any filters defined for the query table.
Since:
7.0
See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT

Constructor Summary

Constructor and Description
FilterOptions()
Default constructor to initialize the filter options.
FilterOptions(java.lang.String selectedAttributes,java.lang.String queryCondition,java.lang.String sortAttributes,java.lang.Integer threshold,java.lang.Integer skipCount,java.util.TimeZone timeZone,java.util.Locale locale,java.lang.Boolean distinctRows)
Constructor that builds a filter option from the passed values.

Method Summary

Modifier and Type Method and Description
  1. java.util.Locale
getLocale()
Returns the locale.
  1. java.lang.String
getQueryCondition()
Returns the query condition.
  1. java.lang.String
getSelectedAttributes()
Returns the specifically selected attributes.
  1. java.lang.Integer
getSkipCount()
Returns the number of entities or rows to be skipped.
  1. java.lang.String
getSortAttributes()
Returns the names of attributes that are to be sorted.
  1. java.lang.Integer
getThreshold()
Returns the threshold.
  1. java.util.TimeZone
getTimeZone()
Returns the time zone.
  1. java.lang.Boolean
isDistinctRows()
Returns whether only distinct rows are to be returned.
  1. void
setDistinctRows(java.lang.Boolean distinctRows)
Sets whether rows should be distinct.
  1. void
setLocale(java.util.Locale locale)
Sets the locale.
  1. void
setQueryCondition(java.lang.String queryCondition)
Sets the query condition.
  1. void
setSelectedAttributes(java.lang.String selectedAttributes)
Sets the attributes to be selected for a query.
  1. void
setSkipCount(java.lang.Integer skipCount)
Sets the skip count.
  1. void
setSortAttributes(java.lang.String sortAttributes)
Sets the attributes to be sorted.
  1. void
setThreshold(java.lang.Integer threshold)
Sets the threshold.
  1. void
setTimeZone(java.util.TimeZone timeZone)
Sets the time zone.
  1. java.lang.String
toString()
Returns a string representation of the FilterOptions object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
See Also:

Constructor Detail

FilterOptions

  1. public FilterOptions()
Default constructor to initialize the filter options.

FilterOptions

  1. public FilterOptions(java.lang.String selectedAttributes,
  2. java.lang.String queryCondition,
  3. java.lang.String sortAttributes,
  4. java.lang.Integer threshold,
  5. java.lang.Integer skipCount,
  6. java.util.TimeZone timeZone,
  7. java.util.Locale locale,
  8. java.lang.Boolean distinctRows)
Constructor that builds a filter option from the passed values.
Parameters:
selectedAttributes - Specifies attribute names to indicate which attribute values are to be returned. Each comma separated part of the selectedAttributes must specify an attribute from the query table that is used for the query.

If instance-based authorization is required, work item information can be added by specifying attributes of the WORK_ITEM query table. These attributes must be prefixed with 'WI.', for example, 'WI.REASON'.

If null is specified, all attributes that are defined on the query table are returned.

queryCondition - The query condition to be applied to the query. The syntax must conform to the Query Table Condition Language.

Specify null if no additional filtering should be applied.

sortAttributes - Sorts the result set by the values of the attributes you identify - see the Query Table Sort Language. Each comma separated part of the sortAttributes must specify an attribute from the query table that is used for the query.

If you identify more that one attribute, the result set is ordered by the values of the first attribute you identify, then by the values of the second attribute, and so on.

Specify null if no sorting is required.

threshold - The maximum number of result set entities or rows to be returned from the server to the client. If a threshold is not required, null must be specified.

Note that it is not guaranteed that threshold entities are returned when queryEntities is called and when threshold entities are available. In the current implementation it is possible that less than threshold entities are returned.

skipCount - The number of entities or rows to be ignored and not to be returned to the caller. For example, a value of '5' means that the first 5 qualifying entities or rows are not returned. Use this parameter together with the threshold to implement paging in your client application.

Specify null or 0 if no skipCount is required.

timeZone - The time zone of the timestamp constants in the query condition. If a timezone is not specified, UTC is assumed.
locale - The locale to specify the language for localized data such as task descriptions.

Note that this value has impact on the calculation of the $LOCALE system variable which may be used in filters and selection criteria.

distinctRows - For queryRows, a specification whether all qualifying rows are to be returned or whether the rows should be distinct. True indicates that the rows should be distinct.

Method Detail

getSelectedAttributes

  1. public java.lang.String getSelectedAttributes( )
Returns the specifically selected attributes.
Returns:
A comma separated list of specifically selected attributes. Returns null if there are no specifically selected attributes. In this case, a query returns the values of all attributes that are defined on the query table.

getQueryCondition

  1. public java.lang.String getQueryCondition( )
Returns the query condition.
Returns:
The query condition. Returns null if there is no query condition.

getSortAttributes

  1. public java.lang.String getSortAttributes( )
Returns the names of attributes that are to be sorted.
Returns:
The attributes to be used for a sort. Returns null if there are no sort criteria.

getThreshold

  1. public java.lang.Integer getThreshold( )
Returns the threshold.
Returns:
The threshold. Returns null if a threshold is not specified.

getSkipCount

  1. public java.lang.Integer getSkipCount( )
Returns the number of entities or rows to be skipped.
Returns:
The skip count. Returns null if no entities or rows are to be skipped.

getTimeZone

  1. public java.util.TimeZone getTimeZone( )
Returns the time zone.
Returns:
The time zone. Returns null if no time zone is set.

getLocale

  1. public java.util.Locale getLocale( )
Returns the locale.
Returns:
The locale. Returns null if no locale is set.

isDistinctRows

  1. public java.lang.Boolean isDistinctRows( )
Returns whether only distinct rows are to be returned.
Returns:
An indication whether only distinct rows are to be returned. Returns null when no selection is made. This means that all qualifying rows are returned.

setSelectedAttributes

  1. public void setSelectedAttributes( java.lang.String selectedAttributes)
Sets the attributes to be selected for a query.
Parameters:
selectedAttributes - A comma separated list of attributes names. Each attribute name must specify an attribute from the query table that is used for the query.

If instance-based authorization is required, work item information can be added by specifying attributes of the WORK_ITEM query table. These attributes must be prefixed with 'WI.', for example, 'WI.REASON'.

If null is specified, all attribute that are defined on the query table are returned.


setQueryCondition

  1. public void setQueryCondition(java.lang.String queryCondition)
Sets the query condition.
Parameters:
queryCondition - The query condition specified in the Query Table Condition Language. Specify null if no additional filtering must be applied.

setSortAttributes

  1. public void setSortAttributes(java.lang.String sortAttributes)
Sets the attributes to be sorted.
Parameters:
sortAttributes - The attributes to be sorted - see the Query Table Sort Language. Specify null if no sorting is required.

setThreshold

  1. public void setThreshold(java.lang.Integer threshold)
Sets the threshold.
Parameters:
threshold - The threshold. If no threshold is required, null must be specified.

setSkipCount

  1. public void setSkipCount(java.lang.Integer skipCount)
Sets the skip count.
Parameters:
skipCount - The skip count. Specify null or 0 if no skip count is required.

setTimeZone

  1. public void setTimeZone(java.util.TimeZone timeZone)
Sets the time zone.
Parameters:
timeZone - The time zone. Specify null if no special time zone is required.

setLocale

  1. public void setLocale(java.util.Locale locale)
Sets the locale.
Parameters:
locale - The locale. Specify null if no special locale is required. Note that this value has impact on the calculation of the $LOCALE system variable which may be used in filters and selection criteria.

setDistinctRows

  1. public void setDistinctRows(java.lang.Boolean distinctRows)
Sets whether rows should be distinct.
Parameters:
distinctRows - An indication whether rows should be distinct. If no no selection is made, this means that all qualifying rows are returned.

toString

  1. public java.lang.String toString( )
Returns a string representation of the FilterOptions object.
Overrides:
toString in class java.lang.Object
Returns:
String - A string representation of the object.