Project: stp

com.ibm.rational.wvcm.stp.cq
Interface CqQuery.DisplayField

Enclosing interface:
CqQuery

public static interface CqQuery.DisplayField

The description of a column of the result set generated by a query. The main element of a DisplayField is the field of a record that is displayed in the corresponding column of the result set. Some display fields may not be visible in the display but will be used only to sort and group the result set.


Nested Class Summary
static class CqQuery.DisplayField.Aggregation
          Supported display field aggregate functions.
static class CqQuery.DisplayField.FieldType
          The value types for result set rows
static class CqQuery.DisplayField.Function
          The functions that can be applied to a DisplayField of type DATE_TIME
static class CqQuery.DisplayField.SortType
          Supported DisplayField sort options
 
Method Summary
 CqQuery.DisplayField.Aggregation getAggregation()
          Returns the aggregate function that is applied to the field path of each selected record to compute the value for the result set.
 String getDescription()
          Returns the description of the field from the schema.
 CqQuery.DisplayField.FieldType getFieldType()
          Returns the FieldType of the display field.
 CqQuery.DisplayField.Function getFunction()
          Returns the simple scalar function that is to be applied to this DisplayField (e.g.
 boolean getIsGroupBy()
          Returns whether or not the field is in a group-by clause.
 boolean getIsLegalForFilter()
          Returns whether or not this field can be used in a query filter.
 boolean getIsVisible()
          Returns whether or not this display field occupies a column in the result set.
 String getLabel()
          Returns the label for the column of the result set that contains values from this display field.
 CqFieldDefinition[] getPath()
          Returns the field path that describes the data source for this display field.
 String getPathName()
          Returns the character image of the field path that is the data source for this display field.
 long getSortOrder()
          Returns the sort order for fields participating in the sort (SortType not equal NO_SORT).
 CqQuery.DisplayField.SortType getSortType()
          Returns a code indicating how this field path participates in the sorting of result set records: ascending, descending or not at all.
 void setAggregation(CqQuery.DisplayField.Aggregation aggregation)
          Sets the aggregate function for this display field.
 void setFunction(CqQuery.DisplayField.Function function)
          Sets the simple scalar function that is to be applied to this DisplayField before inclusion in the result set.
 void setIsGroupBy(boolean isGroupBy)
          Sets whether or not this field is in the group-by clause when aggregation functions are used.
 void setIsVisible(boolean isVisible)
          Sets whether or not this display field occupies a column in the result set
 void setLabel(String label)
          Sets the label for the column of the result set that contains values from this display field.
 void setPath(CqFieldDefinition... arg)
          Sets the field path that describes the data source for this display field.
 void setSortOrder(long sortOrder)
          Sets the sort order position for this display field.
 void setSortType(CqQuery.DisplayField.SortType sortType)
          Sets the SortType code for this display field.
 

Method Detail

getAggregation

CqQuery.DisplayField.Aggregation getAggregation()
Returns the aggregate function that is applied to the field path of each selected record to compute the value for the result set.

Returns:
An Aggregation type code indicating which, if any, aggregate function will be used to compute this display field.

getDescription

String getDescription()
Returns the description of the field from the schema.

Returns:
A String containing the description associated with this field in the schema definition.

getFieldType

CqQuery.DisplayField.FieldType getFieldType()
Returns the FieldType of the display field. This is the data type of the field specified by the Path attribute unless the display field is aggregated, in which case the aggregation function determines this value: e.g., getFieldType would return INT for aggregates of IDs.

Returns:
The CqFieldValue for this display field.

getFunction

CqQuery.DisplayField.Function getFunction()
Returns the simple scalar function that is to be applied to this DisplayField (e.g. month(date))

Returns:
A Function enumerator specifying the scalar function that is to be applied to the field before inclusion in the result set.

getIsGroupBy

boolean getIsGroupBy()
Returns whether or not the field is in a group-by clause.

Returns:
true if the result set is grouped by this display field; otherwise false.

getIsLegalForFilter

boolean getIsLegalForFilter()
Returns whether or not this field can be used in a query filter.

Returns:
true if and only if this field can be used in a filtering expression.

getIsVisible

boolean getIsVisible()
Returns whether or not this display field occupies a column in the result set. Some display fields are used only for sorting, grouping, or filtering and need not be included in the record data returned by the query.

Returns:
true if and only if this display field is included in the result set.

getLabel

String getLabel()
Returns the label for the column of the result set that contains values from this display field.

Returns:
A character image that may be used as the heading for the column of the display in which values from this field are rendered. Will never be null.

getPath

CqFieldDefinition[] getPath()
Returns the field path that describes the data source for this display field.

Returns:
A specification of the property from which the value for this display field is obtained. The path consists of one or more properties, each represented by a PropertyName object. The first property in the path is a property of the query's primary resource type. All properties in the path, except for the last field, must be resource-valued properties, and in each case, the property that follows the resource-valued property must be a property of the resource type referenced by the preceding resource-valued property. Will never be null.

getPathName

String getPathName()
Returns the character image of the field path that is the data source for this display field. This value is computed once and cached for future use.

Returns:
A dot-separated list of the names of the properties in the field path. Will never be null. Will be "" if not yet set.

getSortOrder

long getSortOrder()
Returns the sort order for fields participating in the sort (SortType not equal NO_SORT). The field having sort order 1 is the primary sort key; sort order 2 is the secondary sort key, and so forth.

Returns:
A positive number indicating this display field's ordinal position within the sort key, or zero if this display field is not in the sort key.

getSortType

CqQuery.DisplayField.SortType getSortType()
Returns a code indicating how this field path participates in the sorting of result set records: ascending, descending or not at all.

Returns:
A SortType code indicating how this display field is sorted.

setAggregation

void setAggregation(CqQuery.DisplayField.Aggregation aggregation)
Sets the aggregate function for this display field.

Parameters:
aggregation - An Aggregation type code. Must not be null.

setFunction

void setFunction(CqQuery.DisplayField.Function function)
Sets the simple scalar function that is to be applied to this DisplayField before inclusion in the result set.

Parameters:
function - The Function enumerator specifying the function.

setIsGroupBy

void setIsGroupBy(boolean isGroupBy)
Sets whether or not this field is in the group-by clause when aggregation functions are used.

Parameters:
isGroupBy - If true, this field is in the group-by clause.

setIsVisible

void setIsVisible(boolean isVisible)
Sets whether or not this display field occupies a column in the result set

Parameters:
isVisible - true if this display field is to be included in the result set; false otherwise.

setLabel

void setLabel(String label)
Sets the label for the column of the result set that contains values from this display field.

Parameters:
label - A String containing the label for the display field column. Must not be null.

setPath

void setPath(CqFieldDefinition... arg)
Sets the field path that describes the data source for this display field.

Parameters:
arg - An non-empty array of CqFieldDefinition objects specifying a property path as described in the documentation for getPath(). Must not be null.

setSortOrder

void setSortOrder(long sortOrder)
Sets the sort order position for this display field.

Parameters:
sortOrder - A non-negative integer.

setSortType

void setSortType(CqQuery.DisplayField.SortType sortType)
Sets the SortType code for this display field.

Parameters:
sortType - A SortType code. Must not be null.

Generated Wed 13-Apr-2016 10:51 PM

Copyright © IBM 2016. All rights reserved.