|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moremotion.process.Process
org.moremotion.process.QueryProcess
org.moremotion.process.BlockQueryProcess
public class BlockQueryProcess
Constructor Summary | |
---|---|
BlockQueryProcess()
Creates a new instance of BlockQueryProcess |
Method Summary | |
---|---|
void |
finalizeProcess()
This method is called by the process manager after there is no more records to process. |
java.lang.String[] |
getFieldNames()
The process should return the names of the fields as a String array |
MemoryProcessRecord |
getNextResultRecord()
The query process should create and return the next result record as a MemoryProcessRecord. |
void |
prepare()
The Process should prepare to be called for each process records existing in the configured process block. |
void |
processRecord(ProcessRecord prec)
This method is called by the process manager for each process record in the configured process block that passes through the configured record filter. |
Methods inherited from class org.moremotion.process.Process |
---|
createMessage, createMessage, getCompletionCode, resolve, setCompletionCode |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockQueryProcess()
Method Detail |
---|
public java.lang.String[] getFieldNames() throws ProcessException
QueryProcess
getFieldNames
in class QueryProcess
ProcessException
public MemoryProcessRecord getNextResultRecord() throws ProcessException
QueryProcess
getNextResultRecord
in class QueryProcess
ProcessException
public void prepare() throws ProcessException
Process
prepare
in class Process
ProcessException
- indicates that the preparation failed and means
other methods of this process instance will not be called and the overall completion code of the
process execution will be set to 20.public void processRecord(ProcessRecord prec) throws ProcessException
Process
<callProcess name="x" blockName="PBx" recordFilter="PRICE < 100" ...then the process manager will call the processRecord() method for each record in the process block "PBx" that satisfies the "PRICE < 100" pre-condition.
processRecord
in class Process
prec
- The ProcessRecord Object that contains process fields
ProcessException
- indicates that there is an error and
the process cannot continue. This exception will set the overall completion code to 20.public void finalizeProcess() throws ProcessException
Process
Note that this method is called regardless of the completion code if the prepare method did not throw an exception.
The method should take care of the current completion code and act accordingly
public void finalizeProcess() throws ProcessException { if (getCompletionCode() <= 4) { // successfull completion } else { // unsuccessfull completion } }
finalizeProcess
in class Process
ProcessException
- that indicates that finalization was in an unrecoverable error.
This exception will set the completion code to 20.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |