Package mondrian.rolap.agg
Class AndPredicate
- java.lang.Object
-
- mondrian.rolap.agg.ListPredicate
-
- mondrian.rolap.agg.AndPredicate
-
- All Implemented Interfaces:
StarPredicate
public class AndPredicate extends ListPredicate
Predicate which is the intersection of a list of predicates. It evaluates to true if all of the predicates evaluate to true.- Author:
- jhyde
- See Also:
OrPredicate
-
-
Field Summary
-
Fields inherited from class mondrian.rolap.agg.ListPredicate
children, columns
-
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
-
-
Constructor Summary
Constructors Constructor Description AndPredicate(List<StarPredicate> predicateList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StarPredicateand(StarPredicate predicate)Returns this intersection of this Predicate with another.BitKeycheckInList(SqlQuery sqlQuery, BitKey inListLHSBitKey)booleanevaluate(List<Object> valueList)Evaluates a constraint against a list of values.protected StringgetOp()StarPredicateor(StarPredicate predicate)Returns this union of this Predicate with another.voidtoInListSql(SqlQuery sqlQuery, StringBuilder buf, BitKey inListRHSBitKey)Generate value list for this predicate to be used in an IN-list sql predicate.-
Methods inherited from class mondrian.rolap.agg.ListPredicate
describe, equalConstraint, getChildren, getConstrainedColumnBitKey, getConstrainedColumnList, hashCode, minus, toSql, toString
-
-
-
-
Constructor Detail
-
AndPredicate
public AndPredicate(List<StarPredicate> predicateList)
-
-
Method Detail
-
evaluate
public boolean evaluate(List<Object> valueList)
Description copied from interface:StarPredicateEvaluates a constraint against a list of values.If one of the values is
StarPredicate.WILDCARD, returns true if constraint is true for all possible values of that column.- Parameters:
valueList- List of values, one for each constrained column- Returns:
- Whether constraint holds for given set of values
-
and
public StarPredicate and(StarPredicate predicate)
Description copied from interface:StarPredicateReturns this intersection of this Predicate with another. The result is a Predicate which holds whenever both predicates hold.- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
or
public StarPredicate or(StarPredicate predicate)
Description copied from interface:StarPredicateReturns this union of this Predicate with another. The result is a Predicate which holds whenever either predicate holds.- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
toInListSql
public void toInListSql(SqlQuery sqlQuery, StringBuilder buf, BitKey inListRHSBitKey)
Generate value list for this predicate to be used in an IN-list sql predicate. The values in a multi-column IN list predicates are generated in the same order, based on the bit position from the columnBitKey.
-
getOp
protected String getOp()
- Specified by:
getOpin classListPredicate
-
-