|
||||||||||
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.Predicate
public class Predicate
The Predicate class represents a predicate in the query framework. It is derived from PredicateBase.
This class contains an operator and predicate bases to describe a typical predicate in a query. The operator is usually either "AND" or "OR". For example, a predicate "(age > 30) AND (last name = Smith)" will be decomposed as operator = Operator("AND"), and predicate bases = Condition(Attribute("age"), Operator(">"), Value("30", Constants.DATATYPE_INTEGER)), Condition(Attribute("last name"), Operator("="), Value("Smith", Constants.DATATYPE_CHAR))
Constructor Summary | |
---|---|
Predicate()
Creates a new Predicate instance, default constructor. |
|
Predicate(IOperator operator,
java.util.List predicateBases)
Creates a new Predicate instance with the given operator and list of predicate bases. |
|
Predicate(IOperator operator,
PredicateBase[] predicateBases)
Creates a new Predicate instance with the given operator and array of predicate bases. |
Method Summary | |
---|---|
void |
addPredicateBase(PredicateBase p)
Adds a predicate base to the predicate base list. |
void |
addPredicateBases(java.util.List predicateBases)
Adds an array of predicate bases to the predicate base list. |
java.lang.String |
buildString(ISelectQueryCallback builder)
Builds a query string for the predicate. |
void |
buildString(ISelectQueryCallback builder,
java.lang.StringBuffer sb)
|
boolean |
equals(java.lang.Object o)
Tests for equality with the given object. |
IOperator |
getOperator()
Returns the operator. |
PredicateBase[] |
getPredicateBases()
Returns the array of predicate bases. |
int |
hashCode()
Computes a hash code for the predicate. |
void |
setOperator(IOperator newOperator)
Sets the operator of the predicate. |
void |
setPredicateBases(java.util.List predicateBases)
Sets the predicate bases of the predicate. |
void |
setPredicateBases(PredicateBase[] predicateBases)
Sets the predicate bases of the predicate. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Predicate()
public Predicate(IOperator operator, PredicateBase[] predicateBases)
public Predicate(IOperator operator, java.util.List predicateBases)
Method Detail |
---|
public void addPredicateBase(PredicateBase p)
public void addPredicateBases(java.util.List predicateBases)
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 IOperator getOperator()
getOperator
in interface IPredicate
public PredicateBase[] getPredicateBases()
getPredicateBases
in interface IPredicate
public int hashCode()
hashCode
in class PredicateBase
public void setOperator(IOperator newOperator)
public void setPredicateBases(java.util.List predicateBases)
public void setPredicateBases(PredicateBase[] predicateBases)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |