Package mondrian.rolap.agg
Class AbstractColumnPredicate
- java.lang.Object
-
- mondrian.rolap.agg.AbstractColumnPredicate
-
- All Implemented Interfaces:
StarColumnPredicate,StarPredicate
- Direct Known Subclasses:
ListColumnPredicate,LiteralStarPredicate,MinusStarPredicate,RangeColumnPredicate,ValueColumnPredicate
public abstract class AbstractColumnPredicate extends Object implements StarColumnPredicate
AAbstractColumnPredicateis an abstract implementation forStarColumnPredicate.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractColumnPredicate.FactoryFactory forStarPredicates andStarColumnPredicates.-
Nested classes/interfaces inherited from interface mondrian.rolap.StarColumnPredicate
StarColumnPredicate.Overlap
-
-
Field Summary
Fields Modifier and Type Field Description protected RolapStar.ColumnconstrainedColumn-
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractColumnPredicate(RolapStar.Column constrainedColumn)Creates an AbstractColumnPredicate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StarPredicateand(StarPredicate predicate)Returns this intersection of this Predicate with another.protected static List<StarColumnPredicate>cloneListWithColumn(RolapStar.Column column, List<StarColumnPredicate> list)booleanequalConstraint(StarPredicate that)Returns whether this Predicate has the same constraining effect as the other constraint.booleanevaluate(List<Object> valueList)Evaluates a constraint against a list of values.RolapStar.ColumngetConstrainedColumn()Returns the column constrained by this predicate.BitKeygetConstrainedColumnBitKey()Returns a bitmap of constrained columns to speed up comparisonList<RolapStar.Column>getConstrainedColumnList()Returns a list of constrained columns.StarPredicateor(StarPredicate predicate)Returns this union of this Predicate with another.StarColumnPredicateorColumn(StarColumnPredicate predicate)Returns this union of this Predicate with another.voidtoSql(SqlQuery sqlQuery, StringBuilder buf)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.rolap.StarColumnPredicate
cloneWithColumn, evaluate, intersect, mightIntersect, minus, values
-
Methods inherited from interface mondrian.rolap.StarPredicate
describe
-
-
-
-
Field Detail
-
constrainedColumn
protected final RolapStar.Column constrainedColumn
-
-
Constructor Detail
-
AbstractColumnPredicate
protected AbstractColumnPredicate(RolapStar.Column constrainedColumn)
Creates an AbstractColumnPredicate.- Parameters:
constrainedColumn- Constrained column
-
-
Method Detail
-
getConstrainedColumn
public RolapStar.Column getConstrainedColumn()
Description copied from interface:StarColumnPredicateReturns the column constrained by this predicate.- Specified by:
getConstrainedColumnin interfaceStarColumnPredicate- Returns:
- Column constrained by this predicate.
-
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.
-
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.- Specified by:
evaluatein interfaceStarPredicate- Parameters:
valueList- List of values, one for each constrained column- Returns:
- Whether constraint holds for given set of values
-
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
-
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.- Specified by:
orin interfaceStarPredicate- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
orColumn
public StarColumnPredicate orColumn(StarColumnPredicate predicate)
Description copied from interface:StarColumnPredicateReturns this union of this Predicate with another.Unlike
StarPredicate.or(mondrian.rolap.StarPredicate), the other predicate must be on this column, and the result is a column predicate.- Specified by:
orColumnin interfaceStarColumnPredicate- Parameters:
predicate- Another predicate on this column- Returns:
- Union predicate on this column
-
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.- Specified by:
andin interfaceStarPredicate- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
toSql
public void toSql(SqlQuery sqlQuery, StringBuilder buf)
- Specified by:
toSqlin interfaceStarPredicate
-
cloneListWithColumn
protected static List<StarColumnPredicate> cloneListWithColumn(RolapStar.Column column, List<StarColumnPredicate> list)
-
-