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 forAndPredicate
andOrPredicate
.- Author:
- jhyde
- See Also:
ListColumnPredicate
-
-
Field Summary
Fields Modifier and Type Field Description protected List<StarPredicate>
children
protected List<RolapStar.Column>
columns
-
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ListPredicate(List<StarPredicate> predicateList)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
describe(StringBuilder buf)
Appends a description of this predicate to aStringBuilder
.boolean
equalConstraint(StarPredicate that)
Returns whether this Predicate has the same constraining effect as the other constraint.List<StarPredicate>
getChildren()
BitKey
getConstrainedColumnBitKey()
Returns a bitmap of constrained columns to speed up comparisonList<RolapStar.Column>
getConstrainedColumnList()
Returns a list of constrained columns.protected abstract String
getOp()
int
hashCode()
StarPredicate
minus(StarPredicate predicate)
Returns the logical inverse of this Predicate.void
toSql(SqlQuery sqlQuery, StringBuilder buf)
String
toString()
-
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:StarPredicate
Returns a list of constrained columns.- Specified by:
getConstrainedColumnList
in interfaceStarPredicate
- Returns:
- List of constrained columns
-
getConstrainedColumnBitKey
public BitKey getConstrainedColumnBitKey()
Description copied from interface:StarPredicate
Returns a bitmap of constrained columns to speed up comparison- Specified by:
getConstrainedColumnBitKey
in interfaceStarPredicate
- Returns:
- bitmap representing all constraining columns.
-
getChildren
public List<StarPredicate> getChildren()
-
equalConstraint
public boolean equalConstraint(StarPredicate that)
Description copied from interface:StarPredicate
Returns 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:
equalConstraint
in interfaceStarPredicate
- Parameters:
that
- Other predicate- Returns:
- whether the other predicate is equivalent
-
minus
public StarPredicate minus(StarPredicate predicate)
Description copied from interface:StarPredicate
Returns the logical inverse of this Predicate. The result is a Predicate which holds whenever this predicate holds but the other does not.- Specified by:
minus
in interfaceStarPredicate
- Parameters:
predicate
- Predicate- Returns:
- Combined predicate
-
toSql
public void toSql(SqlQuery sqlQuery, StringBuilder buf)
- Specified by:
toSql
in interfaceStarPredicate
-
getOp
protected abstract String getOp()
-
describe
public void describe(StringBuilder buf)
Description copied from interface:StarPredicate
Appends a description of this predicate to aStringBuilder
. For example:- =any
- =5
- in (2, 4, 6)
- Specified by:
describe
in interfaceStarPredicate
- Parameters:
buf
- Builder to append to
-
-