Package mondrian.rolap
Interface StarPredicate
- All Known Subinterfaces:
StarColumnPredicate
- All Known Implementing Classes:
AbstractColumnPredicate,AndPredicate,ListColumnPredicate,ListPredicate,LiteralStarPredicate,MemberColumnPredicate,MemberTuplePredicate,MinusStarPredicate,OrPredicate,RangeColumnPredicate,ValueColumnPredicate
public interface StarPredicate
Condition which constrains a set of values of a single
RolapStar.Column or a set of columns.
For example, the predicate
Range([Time].[1997].[Q3], [Time].[1998].[Q2])
constrains the year and quarter columns:
((year = 1997 and quarter >= 'Q3')
or (year > 1997))
and ((year = 1998 and quarter <= 'Q2')
or (year < 1998))- Since:
- Jan 15, 2007
- Author:
- jhyde
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectWildcard value forevaluate(java.util.List). -
Method Summary
Modifier and TypeMethodDescriptionand(StarPredicate predicate) Returns this intersection of this Predicate with another.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.booleanEvaluates a constraint against a list of values.Returns a bitmap of constrained columns to speed up comparisonReturns a list of constrained columns.minus(StarPredicate predicate) Returns the logical inverse of this Predicate.or(StarPredicate predicate) Returns this union of this Predicate with another.voidtoSql(SqlQuery sqlQuery, StringBuilder buf)
-
Field Details
-
WILDCARD
Wildcard value forevaluate(java.util.List).
-
-
Method Details
-
getConstrainedColumnList
List<RolapStar.Column> getConstrainedColumnList()Returns a list of constrained columns.- Returns:
- List of constrained columns
-
getConstrainedColumnBitKey
BitKey getConstrainedColumnBitKey()Returns a bitmap of constrained columns to speed up comparison- Returns:
- bitmap representing all constraining columns.
-
describe
Appends a description of this predicate to aStringBuilder. For example:- =any
- =5
- in (2, 4, 6)
- Parameters:
buf- Builder to append to
-
evaluate
Evaluates a constraint against a list of values.If one of the values is
WILDCARD, returns true if constraint is true for all possible values of that column.- Parameters:
valueList- List of values, one for each constrained column- Returns:
- Whether constraint holds for given set of values
-
equalConstraint
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.- Parameters:
that- Other predicate- Returns:
- whether the other predicate is equivalent
-
minus
Returns the logical inverse of this Predicate. The result is a Predicate which holds whenever this predicate holds but the other does not.- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
or
Returns this union of this Predicate with another. The result is a Predicate which holds whenever either predicate holds.- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
and
Returns this intersection of this Predicate with another. The result is a Predicate which holds whenever both predicates hold.- Parameters:
predicate- Predicate- Returns:
- Combined predicate
-
toSql
-