com.metamatrix.query.processor.xml
Class Condition

java.lang.Object
  extended by com.metamatrix.query.processor.xml.Condition
Direct Known Subclasses:
CriteriaCondition, DefaultCondition

public abstract class Condition
extends java.lang.Object

This is a condition which can be evaluated, and which supplies a Program instance which should act as the resulting sub Program to be run (placed on the top of the program stack) if the condition evaluates to true.


Constructor Summary
Condition(Program thenProgram)
           
 
Method Summary
abstract  boolean evaluate(XMLProcessorEnvironment env, com.metamatrix.query.processor.xml.XMLContext ontext)
          This method causes the Condition to evaluate itself.
 Program getThenProgram()
          If this Condition evaluates to true, this Program should be retrieved and placed at the top of the program stack, to be run immediately.
 boolean isProgramRecursive()
          Indicates if the then Program is recursive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Condition

public Condition(Program thenProgram)
Method Detail

getThenProgram

public Program getThenProgram()
If this Condition evaluates to true, this Program should be retrieved and placed at the top of the program stack, to be run immediately.

Returns:
Program sub Program to be run if this Condition evaluates to true

isProgramRecursive

public boolean isProgramRecursive()
Indicates if the then Program is recursive

Returns:
if the then Program is recursive

evaluate

public abstract boolean evaluate(XMLProcessorEnvironment env,
                                 com.metamatrix.query.processor.xml.XMLContext ontext)
                          throws MetaMatrixComponentException,
                                 MetaMatrixProcessingException
This method causes the Condition to evaluate itself.

Parameters:
elementMap - Map of elements to their index in the currentRowData
currentRowData - List of Objects representing the current row of the result set(s)
env - ProcessorEnvironment of the XMLPlan, maintains state of the running XML Processor Plan
Throws:
MetaMatrixComponentException
MetaMatrixProcessingException


Copyright © 2009. All Rights Reserved.