|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.websphere.query.base.PredicateBase com.ibm.websphere.query.base.Condition
public class Condition
The Condition class represents a condition in a predicate in the query framework. It is derived from PredicateBase.
This class contains left operand, operator, and right operands, to describe a typical condition in a query. For example, a simple condition "age > 30" will be decomposed as left operand = Attribute("age"), operator = Operator(">"), and right operand = Value("30")
Constructor Summary | |
---|---|
Condition()
Creates a new Condition instance, default constructor. |
|
Condition(ILeftOperand newLeftOperand)
Creates a new Condition instance with the given left operand object. |
|
Condition(ILeftOperand newLeftOperand,
IOperator newOperator)
Creates a new Condition instance with the given left operand, and operator. |
|
Condition(ILeftOperand newLeftOperand,
IOperator newOperator,
IRightOperand newRightOperand)
Creates a new Condition instance with the given left operand, operator, and right operand. |
|
Condition(ILeftOperand newLeftOperand,
IOperator newOperator,
IRightOperand[] newRightOperands)
Creates a new Condition instance with the given left operand, operator, and an array of right operands. |
Method Summary | |
---|---|
void |
addRightOperand(IRightOperand r)
Adds a right operand to the right operand vector. |
java.lang.String |
buildString(ISelectQueryCallback builder)
Builds a query string for the condition. |
void |
buildString(ISelectQueryCallback builder,
java.lang.StringBuffer sb)
|
boolean |
equals(java.lang.Object o)
Tests for equality with the given object. |
ILeftOperand |
getLeftOperand()
Returns the left operand. |
IOperator |
getOperator()
Returns the operator. |
IRightOperand[] |
getRightOperands()
Returns the right operands as an array. |
int |
hashCode()
Computes a hash code for the condition. |
boolean |
operatorNameEquals(java.lang.String operatorNameString)
|
void |
setLeftOperand(ILeftOperand newLeftOperand)
Sets the left operand of the condition. |
void |
setOperator(IOperator newOperator)
Sets the operator of the condition. |
void |
setRightOperand(IRightOperand r)
Sets the right operand of the condition. |
void |
setRightOperands(IRightOperand[] newRightOperands)
Sets the right operands of the condition. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Condition()
public Condition(ILeftOperand newLeftOperand)
public Condition(ILeftOperand newLeftOperand, IOperator newOperator)
public Condition(ILeftOperand newLeftOperand, IOperator newOperator, IRightOperand[] newRightOperands)
public Condition(ILeftOperand newLeftOperand, IOperator newOperator, IRightOperand newRightOperand)
Method Detail |
---|
public void addRightOperand(IRightOperand r)
public java.lang.String buildString(ISelectQueryCallback builder) throws QueryException
buildString
in interface IStringBuilder
QueryException
public void buildString(ISelectQueryCallback builder, java.lang.StringBuffer sb) throws QueryException
buildString
in interface IStringBuilder
QueryException
public boolean equals(java.lang.Object o)
equals
in class PredicateBase
public ILeftOperand getLeftOperand()
getLeftOperand
in interface ICondition
public IOperator getOperator()
getOperator
in interface ICondition
public IRightOperand[] getRightOperands()
getRightOperands
in interface ICondition
public int hashCode()
hashCode
in class PredicateBase
public void setLeftOperand(ILeftOperand newLeftOperand)
public void setOperator(IOperator newOperator)
public void setRightOperand(IRightOperand r)
public void setRightOperands(IRightOperand[] newRightOperands)
public boolean operatorNameEquals(java.lang.String operatorNameString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |