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 java.lang.Object implements StarPredicate
Base class forAndPredicate
andOrPredicate
.- Author:
- jhyde
- See Also:
ListColumnPredicate
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<StarPredicate>
children
protected java.util.List<RolapStar.Column>
columns
-
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ListPredicate(java.util.List<StarPredicate> predicateList)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
describe(java.lang.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.java.util.List<StarPredicate>
getChildren()
BitKey
getConstrainedColumnBitKey()
Returns a bitmap of constrained columns to speed up comparisonjava.util.List<RolapStar.Column>
getConstrainedColumnList()
Returns a list of constrained columns.protected abstract java.lang.String
getOp()
int
hashCode()
StarPredicate
minus(StarPredicate predicate)
Returns the logical inverse of this Predicate.void
toSql(SqlQuery sqlQuery, java.lang.StringBuilder buf)
java.lang.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 java.util.List<StarPredicate> children
-
columns
protected final java.util.List<RolapStar.Column> columns
-
-
Constructor Detail
-
ListPredicate
protected ListPredicate(java.util.List<StarPredicate> predicateList)
-
-
Method Detail
-
getConstrainedColumnList
public java.util.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 java.util.List<StarPredicate> getChildren()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
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, java.lang.StringBuilder buf)
- Specified by:
toSql
in interfaceStarPredicate
-
getOp
protected abstract java.lang.String getOp()
-
describe
public void describe(java.lang.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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-