com.tivoli.twg.engine
Class TWGDbQueryResults

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGDbQueryResults
All Implemented Interfaces:
java.io.Serializable

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

The TWGDbQueryResults class contains the data that results from a run query command or a create-run query command.

Use getResultSet to obtain the object that contains the row data resulting from the database query.

See Also:
Serialized Form

Constructor Summary
TWGDbQueryResults()
          Default constructor
TWGDbQueryResults(Command cmd)
          This constructor is public as an implementation side effect.
TWGDbQueryResults(java.lang.Long qId)
          Constructor for TWGDbQueryResults
 
Method Summary
 int getFormat()
          Get the query format.
 int getNumOfColumns()
          Gets the number of columns in the result set.
 java.lang.Long getQueryId()
          Get the persistent object id of the query the result set is from.
 TWGDbResultSet getResultSet()
          Get reference to the TWGDbResultSet object for the query that containts the rows for the query result.
protected  void setIntelByteBufferParms(Command cmd)
          Method to write out information about the TWGDbQueryResults into buffers and add the buffers into IPC command.
 void setQueryFormat(int qf)
          Set query format.
 void setQueryId(long qId)
          Set the persistent object id for the query.
 void setQueryId(java.lang.Long qid)
          Set the persistent object id for the query.
 void setReportResultSet(Vect reportResultSet)
          Set the report format result set
 void setResultSet(TWGDbResultSet resultSet)
          Set the result set for join format queries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGDbQueryResults

public TWGDbQueryResults()
Default constructor


TWGDbQueryResults

public TWGDbQueryResults(java.lang.Long qId)
Constructor for TWGDbQueryResults

Parameters:
qId - - the persistent object id for the query

TWGDbQueryResults

public TWGDbQueryResults(Command cmd)
                  throws TWGDbException
This constructor is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release.

Constructor to create a TWGDbQueryResults from an IPC Command object. The command should have output parms (starting with 0 that contain an intel byte buffer version of a TWGDbQueryResults object)

Parameters:
cmd - - Command to read buffer(s) from.
Throws:
TWGDbException
Method Detail

setResultSet

public void setResultSet(TWGDbResultSet resultSet)
Set the result set for join format queries.

This method should be called only in the Director server engine.

Parameters:
resultSet - - reference to TWGDbResultSet

setReportResultSet

public void setReportResultSet(Vect reportResultSet)
Set the report format result set

This method should be called only in the Director server engine.

Parameters:
reportResultSet - - Vect containing list of result set for report format query.

setQueryId

public void setQueryId(java.lang.Long qid)
Set the persistent object id for the query.

This method should be called only in the Director server engine.

Parameters:
qid - - persistent object id for the query

setQueryId

public void setQueryId(long qId)
Set the persistent object id for the query.

This method should be called only in the Director server engine.


setQueryFormat

public void setQueryFormat(int qf)
Set query format. Valid formats are in TWGDatabaseQuery

This method should be called only in the Director server engine.

Parameters:
qf - - queryFormat
See Also:
TWGDatabaseQuery

getQueryId

public java.lang.Long getQueryId()
Get the persistent object id of the query the result set is from.

Returns:
the persistent object id

getFormat

public int getFormat()
Get the query format. Valid values are found in TWGDatabaseQuery.

Returns:
the format
See Also:
TWGDatabaseQuery

getNumOfColumns

public int getNumOfColumns()
Gets the number of columns in the result set.

Returns:
the number of columns

getResultSet

public TWGDbResultSet getResultSet()
                            throws TWGDbException
Get reference to the TWGDbResultSet object for the query that containts the rows for the query result.

Returns:
TWGDbResultSet
Throws:
TWGDbException

setIntelByteBufferParms

protected void setIntelByteBufferParms(Command cmd)
                                throws TWGDbException
Method to write out information about the TWGDbQueryResults into buffers and add the buffers into IPC command.

This method should be called only in the Director server engine.

Parameters:
cmd - - IPC cmmand
Throws:
TWGDbException