|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.query.processor.xml.ProcessorInstruction
com.metamatrix.query.processor.xml.IfInstruction
public class IfInstruction
This instruction holds a List of Criteria, and for each Criteria there is a
Program that will be executed. Therefore, this ProcessorInstruction
implements an arbitrarily deep if-else if-....else block.
During processing, the Criteria are iterated through, in order. When one
evaluates to true, that Criteria's Program is placed on to the
Program stack, and the loop
is broken - this simulates the if-else if-... behavior. An optional
"else" or "default" Program can be added via the
addDefaultChoiceSubProgram
method - this is the optional "else"
block at the end of an if-else if-... construct.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
IfInstruction()
Constructor for IfInstruction. |
|
| Method Summary | |
|---|---|
void |
addCondition(Condition condition)
|
java.util.Map |
getDescriptionProperties()
Get a description as a set of properties of primitive types such as String, Integer, etc. |
com.metamatrix.query.processor.xml.XMLContext |
process(XMLProcessorEnvironment env,
com.metamatrix.query.processor.xml.XMLContext context)
This instruction will evaluate it's criteria, one by one. |
void |
setDefaultCondition(DefaultCondition defaultCondition)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IfInstruction()
endIf - see #getEndIf| Method Detail |
|---|
public void addCondition(Condition condition)
public void setDefaultCondition(DefaultCondition defaultCondition)
public com.metamatrix.query.processor.xml.XMLContext process(XMLProcessorEnvironment env,
com.metamatrix.query.processor.xml.XMLContext context)
throws BlockedException,
MetaMatrixComponentException,
MetaMatrixProcessingException
process in class ProcessorInstructionenv - instance of ProcessorEnvironment which is being used for the processing
of the XML document model query
BlockedException - if data is not available now but may be at a later time
MetaMatrixComponentException - for non-business exception
MetaMatrixProcessingException - for business exception due to user input or modelProcessorInstruction#process(ProcessorEnvironment)public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Map getDescriptionProperties()
Describable
getDescriptionProperties in interface DescribablegetDescriptionProperties in class ProcessorInstruction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||