com.ibm.task.api
Class FilterOptions

java.lang.Object
  extended by com.ibm.task.api.FilterOptions
All Implemented Interfaces:
java.io.Serializable

public final class FilterOptions
extends java.lang.Object
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
static java.lang.String COPYRIGHT
           
 
Constructor Summary
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
 java.util.Locale getLocale()
          Returns the locale.
 java.lang.String getQueryCondition()
          Returns the query condition.
 java.lang.String getSelectedAttributes()
          Returns the specifically selected attributes.
 java.lang.Integer getSkipCount()
          Returns the number of entities or rows to be skipped.
 java.lang.String getSortAttributes()
          Returns the names of attributes that are to be sorted.
 java.lang.Integer getThreshold()
          Returns the threshold.
 java.util.TimeZone getTimeZone()
          Returns the time zone.
 java.lang.Boolean isDistinctRows()
          Returns whether only distinct rows are to be returned.
 void setDistinctRows(java.lang.Boolean distinctRows)
          Sets whether rows should be distinct.
 void setLocale(java.util.Locale locale)
          Sets the locale.
 void setQueryCondition(java.lang.String queryCondition)
          Sets the query condition.
 void setSelectedAttributes(java.lang.String selectedAttributes)
          Sets the attributes to be selected for a query.
 void setSkipCount(java.lang.Integer skipCount)
          Sets the skip count.
 void setSortAttributes(java.lang.String sortAttributes)
          Sets the attributes to be sorted.
 void setThreshold(java.lang.Integer threshold)
          Sets the threshold.
 void setTimeZone(java.util.TimeZone timeZone)
          Sets the time zone.
 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

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

FilterOptions

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


FilterOptions

public 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.

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

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

public java.lang.String getQueryCondition()
Returns the query condition.

Returns:
The query condition. Returns null if there is no query condition.

getSortAttributes

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

public java.lang.Integer getThreshold()
Returns the threshold.

Returns:
The threshold. Returns null if a threshold is not specified.

getSkipCount

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

public java.util.TimeZone getTimeZone()
Returns the time zone.

Returns:
The time zone. Returns null if no time zone is set.

getLocale

public java.util.Locale getLocale()
Returns the locale.

Returns:
The locale. Returns null if no locale is set.

isDistinctRows

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

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

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

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

public void setThreshold(java.lang.Integer threshold)
Sets the threshold.

Parameters:
threshold - The threshold. If no threshold is required, null must be specified.

setSkipCount

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

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

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

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

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.