com.ibm.rational.wvcm.stp.cq
Interface CqResultSet
- All Superinterfaces:
- Iterable<CqRowData>, Iterator<CqRowData>, StpReleasable
public interface CqResultSet
- extends StpReleasable, Iterator<CqRowData>, Iterable<CqRowData>
An interface specifying the structure returned by CqQuery.doExecute and
CqRecordType.doQuery to represent the results of executing a ClearQuest
query.
A CqResultSet is an Iterable as well as an Iterator. Each invocation of its
iterator() method does not restart the iteration. It just continues
from the last read row. That is CqResultSet.iterator() simply returns the
CqResultSet object. It is provided to allow the use of CqResultSet objects in
the Java 5 for-each construct.
- See Also:
CqQuery.doExecute(long, long,
com.ibm.rational.wvcm.stp.cq.CqQuery.ListOptions,
com.ibm.rational.wvcm.stp.cq.CqQuery.FilterLeaf[])
,
CqRecordType.doQuery(String, long, long,
com.ibm.rational.wvcm.stp.cq.CqQuery.ListOptions)
,
CqRecordType.doQuery(com.ibm.rational.wvcm.stp.cq.CqQuery.DisplayField[],
com.ibm.rational.wvcm.stp.cq.CqQuery.Filter, long, long,
com.ibm.rational.wvcm.stp.cq.CqQuery.ListOptions)
Methods inherited from interface Iterator |
hasNext, next, remove |
Methods inherited from interface Iterable |
iterator |
getColumnLabels
String[] getColumnLabels()
- Returns:
- A String[] containing the label defined for each column of the
result set.
getColumnTypes
CqQuery.DisplayField.FieldType[] getColumnTypes()
- Returns:
- A FieldType[] containing FieldType enumerators that specify the
type of data returned in each column of the result set. In the
result set generated by a raw SQL query the column type is
inferred from the database data type and not a field definition.
Thus, in this case, only the following generic FieldType
enumerators are used in this array: BINARY, SHORT_STRING,
MULTILINE_STRING, INTEGER, FLOAT, and DATE_TIME.
getQuery
CqQuery getQuery()
- Returns a CqQuery proxy for the query that was executed to generate this
result set. It is available only from CqQuery.doExecute and only if the
ListOptions passed to that method defined
ListOptions.getQueryPropertyRequest() to return a non-null
PropertyRequest.
- Returns:
- If CqQuery.ListOptions.getQueryPropertyRequest() was not
null, a proxy for the executed query populated with the
requested properties; otherwise null.
- See Also:
CqQuery.CommonOptions.getQueryPropertyRequest()
getRowCount
long getRowCount()
- The total number of rows found by the query in the database. This value
is available only if requested when the query was executed and this
result set was generated. If computed, this number would be the upper
bound on the number of CqRowData elements to expect in this result set.
The actual content of the iterator may be less or even empty depending
on the options specified for the execution of the query.
- Returns:
- If a row count was requested, the total number of rows found by
the query in the database; if a row count was not requested, -1.
- See Also:
CqQuery.ListOptions.getEnableRowCount()
getRowNumberHardLimit
long getRowNumberHardLimit()
- Returns:
- The absolute upper bound on the maximum row number that can be
returned by a query. This value is established by the ClearQuest database
administrator and cannot be changed via this API.
getRowNumberSoftLimit
long getRowNumberSoftLimit()
- Returns:
- The default upper bound on the maximum row number that can be
returned by a query. This value is established by the ClearQuest
database administrator. It can be overridden by defining
CqQuery.CommonOptions.getRowNumberLimit()
to return the
overriding value.
getSql
String getSql()
- Returns:
- A String containing the query expressed as a vendor-specific SQL
select statement.
isRowNumberLimitExceeded
boolean isRowNumberLimitExceeded()
- Returns:
- Answers whether or not a row number generated by the query
exceeded the smaller of
ListOption.getRowNumberLimit()
(which
defaults to getRowNumberSoftLimit()
)
getRowNumberHardLimit()
. Note that the value returned by this method does not
indicate whether or not the maxRows
limit was
exceeded. - See Also:
CqQuery.CommonOptions.getRowNumberLimit()
Copyright © IBM 2010. All rights reserved.