Project: stp

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

All Superinterfaces:
CqQuery.CommonOptions
All Known Implementing Classes:
CqQuery.ListOptionsClass
Enclosing interface:
CqQuery

public static interface CqQuery.ListOptions
extends CqQuery.CommonOptions

An extension of the CommonOptions interface specifying an additional set of parameters applying only to the generation of query result sets.


Field Summary
static CqQuery.DisplayField[] FULL_CONVERSION
          As the value returned by getValueConvertionData(), causes each NULL_IMAGE string to be converted to null and each other string to be converted to the native Java data type specified for the column in CqResultSet.getColumnTypes().
static CqQuery.DisplayField[] NO_CONVERSION
          As the value returned by getValueConvertionData(), suppresses all data conversions.
static CqQuery.DisplayField[] NULL_CONVERSION
          As the value returned by getValueConvertionData(), causes NULL_IMAGE strings to be converted to nulls.
 
Method Summary
 Boolean getEnableRowCount()
          If TRUE, the total number of rows generated by the query will be computed by the sever and returned as the value of CqResultSet.getRowCount().
 Long getMaxMultiLineTextLength()
           
 CqQuery.DisplayField[] getValueConversionData()
          Specifies how CqRowData is to interpret the string data for a row when computing the Object[] returned by CqRowData.getValues().
 
Methods inherited from interface CqQuery.CommonOptions
getQueryPropertyRequest, getRowNumberLimit
 

Field Detail

FULL_CONVERSION

static final CqQuery.DisplayField[] FULL_CONVERSION
As the value returned by getValueConvertionData(), causes each NULL_IMAGE string to be converted to null and each other string to be converted to the native Java data type specified for the column in CqResultSet.getColumnTypes().

Since an SQL-based query has no controlling DisplayField[] array, this conversion is for SQL-based query uses only rudimentary types.


NO_CONVERSION

static final CqQuery.DisplayField[] NO_CONVERSION
As the value returned by getValueConvertionData(), suppresses all data conversions.


NULL_CONVERSION

static final CqQuery.DisplayField[] NULL_CONVERSION
As the value returned by getValueConvertionData(), causes NULL_IMAGE strings to be converted to nulls.

Method Detail

getEnableRowCount

Boolean getEnableRowCount()
If TRUE, the total number of rows generated by the query will be computed by the sever and returned as the value of CqResultSet.getRowCount(). All of these rows will be in the response only if maxRows is at least as great as the row count. If FALSE, no count is computed; CqResultSet.getRowCount() returns -1. In this latter case, if the number of elements in the response is equal to maxRows, there is no way to tell if there were more rows in the result set not returned by the response.

Returns:
TRUE if doExeute/doQuery is to compute and return a count of the number of resources that match the filter (whether or not those resources are actually returned from the server); FALSE or null if only the maximum number of records are to be returned with no indication whether or not there might be more.

getMaxMultiLineTextLength

Long getMaxMultiLineTextLength()
Returns:
The maximum number of characters that are to be included in each row of the response for each multi-line text display field. If null, the default limit established by the server will be applied.

getValueConversionData

CqQuery.DisplayField[] getValueConversionData()
Specifies how CqRowData is to interpret the string data for a row when computing the Object[] returned by CqRowData.getValues().

If this method returns the distinguished value NO_CONVERSION, the array returned by CqRowData.getValues() will be the same array of Strings returned by CqRowData.getStrings(); otherwise, getValues() will return an array of native Java objects obtained by converting the string image in each column to an object of the type specified for the column in the DisplayField[] returned by this option. (NULL_IMAGE Strings will be converted to null).

Enabling this conversion will require some extra overhead in executing the query since the type information must be collected for each column and that may require additional round-trips to the server if not already specified in the DisplayField[] returned by this option. Conversion to Java objects for a particular row is not attempted, however, until the getValues() method is invoked on that row.

The default behavior is to use the type information returned by CqResultSet.getColumnTypes() to perform the conversion when requested.

Another possible return is a non-empty DisplayField[], which is useful primarily when the query is SQL based. For a SQL-based query, the client must provide the detailed type information based on it's knowledge of the fields returned by the SQL statement it is using. An explicit DisplayField[] might also be returned to avoid an extra round-trip to the server to obtain the DISPLAY_FIELD information. The DisplayField[] used to define a query or used in the invocation of CqFieldDefinition.doQuery would always be a suitable return value, but lighter weight DisplayField[]s will often do as well.

If an explicit DisplayField[] is returned, the number of visible fields in the array must be the same as the number of items returned by CqRowData.getStrings(). Each visible DisplayField must define at least one of its Path, FieldType, Aggregation or Function attributes. The remaining attributes are ignored. If only the Path attribute is specified, the FieldType will be obtained from the last CqFieldDefinition of that Path (requesting that information from the server if necessary).

If the Aggregation attribute is COUNT, the other attributes are ignored and the column value is converted to an Integer.

If the Function attribute is not null and not NONE, the other attributes are ignored and the column value is converted to a Date object.

If the FieldType is RESOURCE or RESOURCE_LIST, the Path attribute must be specified so that the type of the resource referenced by that path can be determined. (The CqFieldDefintion.REFERENCED_RECORD_TYPE property is used for this purpose and will be obtained from the server if not defined by the last proxy in the Path.)

Returns:
NO_CONVERSION, NULL_CONVERSION, FULL_CONVERSION, or a DisplayField[] specifying a visible field for each value returned for a row.

Generated Tue 10-Jun-2014 09:00 AM

Copyright © IBM 2014. All rights reserved.