com.ibm.gre.samples.collectionhelpers
Class IRMBatchQuery

java.lang.Object
  |
  +--com.ibm.gre.samples.collectionhelpers.IRMQuery
        |
        +--com.ibm.gre.samples.collectionhelpers.IRMBatchQuery

public class IRMBatchQuery
extends IRMQuery

The IRMBatchQuery class encapsulates the XML used to execute a Batch Life Cycle Query. There are methods for begininning the Asynchronous task and subsequent methods for determining the status and getting return values. See the documentation for the BatchControllerEJB interface in the com.ibm.gre.engine.ejb.facade package conatined in the IBM DB2 Records Manager API Reference.


Constructor Summary
IRMBatchQuery(java.lang.String queryXML, ClientSession session, java.lang.String strScope, boolean addDisplayInfo, int optionalFieldsMask)
           
 
Method Summary
 java.lang.String getTaskId()
          The ID of the current task.
 java.lang.String getTaskName()
          The name of the current task
 void Initialize()
          Call the Initialize method immediately after the class has been constructed to generate the internal representation of the query.
 int runQuery(int nBlockStart, int nBlockSize)
          Overrides the IRMQuery runQuery method.
 
Methods inherited from class com.ibm.gre.samples.collectionhelpers.IRMQuery
getBlockSize, getBlockStart, getCondition, getFieldValue, getFlPlnCmpntDefName, getLine, getLineCount, getModifiedQuery, getQuery, getQueryResultOptions, getQueryType, getReportTemplate, getResultList, getSession, getTotalResults, setBlockSize, setBlockStart, setFieldValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRMBatchQuery

public IRMBatchQuery(java.lang.String queryXML,
                     ClientSession session,
                     java.lang.String strScope,
                     boolean addDisplayInfo,
                     int optionalFieldsMask)
              throws com.ibm.gre.engine.util.RecordManagerException,
                     java.lang.Exception
Method Detail

Initialize

public void Initialize()
                throws java.lang.Exception
Description copied from class: IRMQuery
Call the Initialize method immediately after the class has been constructed to generate the internal representation of the query.

Overrides:
Initialize in class IRMQuery
Throws:
java.lang.Exception

runQuery

public int runQuery(int nBlockStart,
                    int nBlockSize)
             throws java.lang.Exception
Overrides the IRMQuery runQuery method. If the Asynchronous task has not begun this method will call the BatchController beginTask method to start the Life Cycle Query.

Overrides:
runQuery in class IRMQuery
Parameters:
nBlockStart - The index value return a block of values from. 0 indicates the first value.
nBlockSize - The number of values to return. 0 indicates return all values.
Returns:
An integer value indicating the status of the task. Positive values indicate percent complete. Negative values refer to BatchResultStatusTypes.
Throws:
java.lang.Exception

getTaskId

public java.lang.String getTaskId()
The ID of the current task.

Returns:
String

getTaskName

public java.lang.String getTaskName()
The name of the current task

Returns:
String