Project: stp

com.ibm.rational.wvcm.stp.cq
Interface CqRowData


public interface CqRowData

The interface for a row of a result set generated by the execution of a query.


Field Summary
static String NULL_IMAGE
          The unique String instance used to represent the string image of a null field.
 
Method Summary
 StpActivity getRecord()
          Returns a proxy for the resource from which the fields of this row were generated.
 long getRowNumber()
          Returns the ordinal position of this row in the result set.
 String[] getStrings()
          Returns the raw data for the row in column order as string images.
 Object[] getValues()
          Returns the data for the row as native Java objects in column order.
 

Field Detail

NULL_IMAGE

static final String NULL_IMAGE
The unique String instance used to represent the string image of a null field.

See Also:
Constant Field Values
Method Detail

getRecord

StpActivity getRecord()
                      throws WvcmException
Returns a proxy for the resource from which the fields of this row were generated.

NOTE This method will return a non-null value only if row data contains a field of the primary record of type CqFieldValue.ValueType.ID or CqFieldValue.ValueType.DBID. If both fields are defined, the ID field is chosen to create the record's user-friendly location. Also, the ID or DBID field must not have had an "aggregate" operation applied to it. For queries on a record-type family, a field of type RECORD_TYPE must also be present.

To obtain a proxy from row data generated by a SQL-based query, the required DisplayField information must have been be provided by the client to the query operation by overriding the default definition of ListOptions.getValueConversionData(). For queries defined by a DisplayField[], the value will be available regardless of the conversion level in effect, provided the row data contains the necessary fields for generation of the resource location.

Returns:
A CqRecord proxy for the record from which the fields of this row were computed; null if the record location cannot be determined.
Throws:
WvcmException

getRowNumber

long getRowNumber()
Returns the ordinal position of this row in the result set.

Returns:
A positive integer specifying the row number of this row within the result set generated by the query. (The first row is row number 1.)

getStrings

String[] getStrings()
Returns the raw data for the row in column order as string images. The data items correlate with the visible DisplayFields of the query that generated this row.

In this presentation all values are strings containing the image of the field.

Returns:
A homogeneous array of String objects

getValues

Object[] getValues()
Returns the data for the row as native Java objects in column order. The data items correlate with the visible DisplayFields of the query that generated this row.

The extent to which the raw string values of the row are converted to Java objects depends on the DisplayField information made available to the query operation. For queries defined by a DisplayField[], the default is to use the defining DisplayField[] to convert all images to a native Java object appropriate to the type of data displayed in the column. For SQL-based queries, the default action is to use the types returned by CqResultSet.getColumnTypes()

Clients can alter the default conversion behavior by providing an alternative DisplayField[] to use for conversion as the value returned by the ListOptions#getValueConversionData() method.

In all cases, conversion of row data is not attempted until this method is invoked.

Returns:
A heterogeneous array of Java object types, including proxy objects, and nulls, representing the data in one row of a result set.
See Also:
CqQuery.ListOptions.getValueConversionData()

Generated Wed 11-Jun-2014 01:18 AM

Copyright © IBM 2014. All rights reserved.