Package mondrian.rolap.agg
Class ListPredicate
- java.lang.Object
-
- mondrian.rolap.agg.ListPredicate
-
- All Implemented Interfaces:
StarPredicate
- Direct Known Subclasses:
AndPredicate,OrPredicate
public abstract class ListPredicate extends Object implements StarPredicate
Base class forAndPredicateandOrPredicate.- Author:
- jhyde
- See Also:
ListColumnPredicate
-
-
Field Summary
Fields Modifier and Type Field Description protected List<StarPredicate>childrenprotected List<RolapStar.Column>columns-
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedListPredicate(List<StarPredicate> predicateList)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddescribe(StringBuilder buf)Appends a description of this predicate to aStringBuilder.booleanequalConstraint(StarPredicate that)Returns whether this Predicate has the same constraining effect as the other constraint.List<StarPredicate>getChildren()BitKeygetConstrainedColumnBitKey()Returns a bitmap of constrained columns to speed up comparisonList<RolapStar.Column>getConstrainedColumnList()Returns a list of constrained columns.protected abstract StringgetOp()inthashCode()StarPredicateminus(StarPredicate predicate)Returns the logical inverse of this Predicate.voidtoSql(SqlQuery sqlQuery, StringBuilder buf)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.rolap.StarPredicate
and, evaluate, or
-
-
-
-
Field Detail
-
children
protected final List<StarPredicate> children
-
columns
protected final List<RolapStar.Column> columns
-
-
Constructor Detail
-
ListPredicate
protected ListPredicate(List<StarPredicate> predicateList)
-
-
Method Detail
-
getConstrainedColumnList
public List<RolapStar.Column> getConstrainedColumnList()
Description copied from interface:StarPredicateReturns a list of constrained columns.- Specified by:
getConstrainedColumnListin interfaceStarPredicate- Returns:
- List of constrained columns
-
getConstrainedColumnBitKey
public BitKey getConstrainedColumnBitKey()
Description copied from interface:StarPredicateReturns a bitmap of constrained columns to speed up comparison- Specified by:
getConstrainedColumnBitKeyin interfaceStarPredicate- Returns:
- bitmap representing all constraining columns.
-
getChildren
public List<StarPredicate> getChildren()
-
equalConstraint
public boolean equalConstraint(StarPredicate that)
Description copied from interface:StarPredicateReturns whether this Predicate has the same constraining effect as the other constraint. This is weaker thanObject.equals(Object): it is possible for two different members to constrain the same column in the same way.- Specified by:
equalConstraintin interfaceStarPredicate- Parameters:
that- Other predicate- Returns:
- whether the other predicate is equivalent
-
minus
public StarPredicate minus(StarPredicate predicate)
Description copied from interface:StarPredicateReturns the logical inverse of this Predicate. The result is a Predicate which holds whenever this predicate holds but the other does not.- Specified by:
minusin interfaceStarPredicate- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
toSql
public void toSql(SqlQuery sqlQuery, StringBuilder buf)
- Specified by:
toSqlin interfaceStarPredicate
-
getOp
protected abstract String getOp()
-
describe
public void describe(StringBuilder buf)
Description copied from interface:StarPredicateAppends a description of this predicate to aStringBuilder. For example:- =any
- =5
- in (2, 4, 6)
- Specified by:
describein interfaceStarPredicate- Parameters:
buf- Builder to append to
-
-