com.ibm.tws.conn.util
Class QueryResult

java.lang.Object
  extended bycom.ibm.tws.conn.util.QueryResult
All Implemented Interfaces:
java.io.Serializable

public class QueryResult
extends java.lang.Object
implements java.io.Serializable

This class is used in the query API. It wraps a list that contains the items that match the query filter, and the query context including the information required to perform a queryNext call.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright
 
Constructor Summary
QueryResult(QueryContext queryCtx, byte[] lst)
          Constructor (to be used for byte transfer mode)
QueryResult(QueryContext queryCtx, java.util.List lst)
          Constructor (to be used for object transfer mode)
 
Method Summary
 int getCount()
          Returns the total number of items that match the query filter, including this chunk and all the following ones.
 java.util.List getList()
          Returns the list of items that match the query filter
 byte[] getListAsByteArray()
          Returns the list of the items that match the query filter, as a byte array
 QueryContext getQueryContext()
          Returns the query context required to perform the queryNext call
 void setCount(int value)
          Sets the total number of items that match the query filter, including this chunk and all the following ones
 void setList(java.util.List lst)
          Sets the list of items that match the query filter
 void setListAsByteArray(byte[] lst)
          Sets the list of the items that match the query filter, as a byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright

Constructor Detail

QueryResult

public QueryResult(QueryContext queryCtx,
                   java.util.List lst)
Constructor (to be used for object transfer mode)

Parameters:
queryCtx - The query context
lst - The list of items that match the query filter

QueryResult

public QueryResult(QueryContext queryCtx,
                   byte[] lst)
Constructor (to be used for byte transfer mode)

Parameters:
queryCtx - The query context
lst - The list of items that match the query filter, as a byte array
Method Detail

getQueryContext

public QueryContext getQueryContext()
Returns the query context required to perform the queryNext call

Returns:
the query context required to perform the queryNext call

getList

public java.util.List getList()
Returns the list of items that match the query filter

Returns:
The list of items that match the query filter

setList

public void setList(java.util.List lst)
Sets the list of items that match the query filter

Parameters:
lst - The list of items that match the query filter

getListAsByteArray

public byte[] getListAsByteArray()
Returns the list of the items that match the query filter, as a byte array

Returns:
The list of items that match the query filter, as a byte array

setListAsByteArray

public void setListAsByteArray(byte[] lst)
Sets the list of the items that match the query filter, as a byte array

Parameters:
lst - The list of items that match the query filter, as a byte array

setCount

public void setCount(int value)
Sets the total number of items that match the query filter, including this chunk and all the following ones

Parameters:
value - The total number of items that match the query filter

getCount

public int getCount()
Returns the total number of items that match the query filter, including this chunk and all the following ones. For queries on model objects, or when the count is not available, this method returns -1.

Returns:
The total number of items that match the query filter, or -1 if the count is not available


Copyright © 2005 IBM All Rights Reserved.