mondrian.rolap.agg
Class OrPredicate

java.lang.Object
  extended by mondrian.rolap.agg.ListPredicate
      extended by mondrian.rolap.agg.OrPredicate
All Implemented Interfaces:
StarPredicate

public class OrPredicate
extends ListPredicate

Predicate which is the union of a list of predicates. It evaluates to true if any of the predicates evaluates to true.

Author:
jhyde
See Also:
OrPredicate
 

Field Summary
 
Fields inherited from class mondrian.rolap.agg.ListPredicate
children, columnBitKey, columns
 
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
 
Constructor Summary
OrPredicate(List<StarPredicate> predicateList)
           
 
Method Summary
 StarPredicate and(StarPredicate predicate)
          Returns this intersection of this Predicate with another.
 boolean evaluate(List<Object> valueList)
          Evaluates a constraint against a list of values.
protected  String getOp()
           
 StarPredicate or(StarPredicate predicate)
          Returns this union of this Predicate with another.
 void toSql(SqlQuery sqlQuery, StringBuilder buf)
           
 
Methods inherited from class mondrian.rolap.agg.ListPredicate
describe, equalConstraint, getChildren, getConstrainedColumnBitKey, getConstrainedColumnList, hashCode, minus, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrPredicate

public OrPredicate(List<StarPredicate> predicateList)
Method Detail

evaluate

public boolean evaluate(List<Object> valueList)
Description copied from interface: StarPredicate
Evaluates 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

or

public StarPredicate or(StarPredicate predicate)
Description copied from interface: StarPredicate
Returns this union of this Predicate with another. The result is a Predicate which holds whenever either predicate holds.

Parameters:
predicate - Predicate
Returns:
Combined predicate

and

public StarPredicate and(StarPredicate predicate)
Description copied from interface: StarPredicate
Returns this intersection of this Predicate with another. The result is a Predicate which holds whenever both predicates hold.

Parameters:
predicate - Predicate
Returns:
Combined predicate

toSql

public void toSql(SqlQuery sqlQuery,
                  StringBuilder buf)
Specified by:
toSql in interface StarPredicate
Overrides:
toSql in class ListPredicate

getOp

protected String getOp()
Specified by:
getOp in class ListPredicate

SourceForge.net_Logo