org.azzyzt.jee.runtime.dto.query
Class BinaryBooleanExpression

java.lang.Object
  extended by org.azzyzt.jee.runtime.dto.query.Expression
      extended by org.azzyzt.jee.runtime.dto.query.BinaryBooleanExpression
All Implemented Interfaces:
java.io.Serializable, Node
Direct Known Subclasses:
And, Or

public abstract class BinaryBooleanExpression
extends Expression
implements Node

Abstract boolean expression class with some common code for validity checking and simplification

See Also:
Serialized Form

Constructor Summary
BinaryBooleanExpression()
           
 
Method Summary
 void add(Expression e)
          Adds an expression to the current Node.
 Expression getReplaceableBy()
           
 java.util.List<Expression> getTerms()
           
 boolean isValid()
           
 void setTerms(java.util.List<Expression> terms)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryBooleanExpression

public BinaryBooleanExpression()
Method Detail

isValid

public boolean isValid()
Specified by:
isValid in interface Node
Specified by:
isValid in class Expression
Returns:
true if the expression is valid

add

public void add(Expression e)
Description copied from interface: Node
Adds an expression to the current Node. Invalid XML can cause a QuerySyntaxExpression.

Specified by:
add in interface Node
Parameters:
e - the expression to be added

getTerms

public java.util.List<Expression> getTerms()

setTerms

public void setTerms(java.util.List<Expression> terms)

getReplaceableBy

public Expression getReplaceableBy()
Specified by:
getReplaceableBy in interface Node
Specified by:
getReplaceableBy in class Expression
Returns:
a simpler and equivalent expression or null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object