|
Project: stp | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface CqQuery.ListOptions
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 |
---|
static final CqQuery.DisplayField[] FULL_CONVERSION
CqResultSet.getColumnTypes()
.
Since an SQL-based query has no controlling DisplayField[] array, this conversion is for SQL-based query uses only rudimentary types.
static final CqQuery.DisplayField[] NO_CONVERSION
static final CqQuery.DisplayField[] NULL_CONVERSION
Method Detail |
---|
Boolean getEnableRowCount()
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.
Long getMaxMultiLineTextLength()
CqQuery.DisplayField[] getValueConversionData()
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.)
|
Generated Wed 14-Mar-2018 10:38 PM | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |