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
A
AbstractColumnPredicate
is an abstract implementation for
StarColumnPredicate
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Factory forStarPredicate
s andStarColumnPredicate
s.Nested classes/interfaces inherited from interface mondrian.rolap.StarColumnPredicate
StarColumnPredicate.Overlap
-
Field Summary
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractColumnPredicate
(RolapStar.Column constrainedColumn) Creates an AbstractColumnPredicate. -
Method Summary
Modifier and TypeMethodDescriptionand
(StarPredicate predicate) Returns this intersection of this Predicate with another.protected static List<StarColumnPredicate>
cloneListWithColumn
(RolapStar.Column column, List<StarColumnPredicate> list) boolean
equalConstraint
(StarPredicate that) Returns whether this Predicate has the same constraining effect as the other constraint.boolean
Evaluates a constraint against a list of values.Returns the column constrained by this predicate.Returns a bitmap of constrained columns to speed up comparisonReturns a list of constrained columns.or
(StarPredicate predicate) Returns this union of this Predicate with another.orColumn
(StarColumnPredicate predicate) Returns this union of this Predicate with another.void
toSql
(SqlQuery sqlQuery, StringBuilder buf) toString()
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 Details
-
constrainedColumn
-
-
Constructor Details
-
AbstractColumnPredicate
Creates an AbstractColumnPredicate.- Parameters:
constrainedColumn
- Constrained column
-
-
Method Details
-
toString
-
getConstrainedColumn
Description copied from interface:StarColumnPredicate
Returns the column constrained by this predicate.- Specified by:
getConstrainedColumn
in interfaceStarColumnPredicate
- Returns:
- Column constrained by this predicate.
-
getConstrainedColumnList
Description copied from interface:StarPredicate
Returns a list of constrained columns.- Specified by:
getConstrainedColumnList
in interfaceStarPredicate
- Returns:
- List of constrained columns
-
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.
-
evaluate
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.- Specified by:
evaluate
in interfaceStarPredicate
- Parameters:
valueList
- List of values, one for each constrained column- Returns:
- Whether constraint holds for given set of values
-
equalConstraint
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
-
or
Description copied from interface:StarPredicate
Returns this union of this Predicate with another. The result is a Predicate which holds whenever either predicate holds.- Specified by:
or
in interfaceStarPredicate
- Parameters:
predicate
- Predicate- Returns:
- Combined predicate
-
orColumn
Description copied from interface:StarColumnPredicate
Returns 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:
orColumn
in interfaceStarColumnPredicate
- Parameters:
predicate
- Another predicate on this column- Returns:
- Union predicate on this column
-
and
Description copied from interface:StarPredicate
Returns this intersection of this Predicate with another. The result is a Predicate which holds whenever both predicates hold.- Specified by:
and
in interfaceStarPredicate
- Parameters:
predicate
- Predicate- Returns:
- Combined predicate
-
toSql
- Specified by:
toSql
in interfaceStarPredicate
-
cloneListWithColumn
protected static List<StarColumnPredicate> cloneListWithColumn(RolapStar.Column column, List<StarColumnPredicate> list)
-