Package mondrian.rolap.agg
Class MemberTuplePredicate
- java.lang.Object
 - 
- mondrian.rolap.agg.MemberTuplePredicate
 
 
- 
- All Implemented Interfaces:
 StarPredicate
public class MemberTuplePredicate extends Object implements StarPredicate
Predicate which constrains a column to a particular member, or a range above or below a member, or a range between two members.- Author:
 - jhyde
 
 
- 
- 
Field Summary
- 
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD 
 - 
 
- 
Constructor Summary
Constructors Constructor Description MemberTuplePredicate(RolapCube baseCube, RolapCubeMember member)Creates a MemberTuplePredicate which evaluates to true for a given member.MemberTuplePredicate(RolapCube baseCube, RolapMember lower, boolean lowerStrict, RolapMember upper, boolean upperStrict)Creates a MemberTuplePredicate which evaluates to true for a given range of members. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StarPredicateand(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.booleanequals(Object obj)booleanevaluate(List<Object> valueList)Evaluates a constraint against a list of values.BitKeygetConstrainedColumnBitKey()Returns a bitmap of constrained columns to speed up comparisonList<RolapStar.Column>getConstrainedColumnList()Returns a list of constrained columns.inthashCode()StarPredicateminus(StarPredicate predicate)Returns the logical inverse of this Predicate.StarPredicateor(StarPredicate predicate)Returns this union of this Predicate with another.voidtoSql(SqlQuery sqlQuery, StringBuilder buf) 
 - 
 
- 
- 
Constructor Detail
- 
MemberTuplePredicate
public MemberTuplePredicate(RolapCube baseCube, RolapMember lower, boolean lowerStrict, RolapMember upper, boolean upperStrict)
Creates a MemberTuplePredicate which evaluates to true for a given range of members.The range can be open above or below, but at least one bound is required.
- Parameters:
 baseCube- base cube for virtual memberslower- Member which forms the lower bound, or null if range is open belowlowerStrict- Whether lower bound of range is strictupper- Member which forms the upper bound, or null if range is open aboveupperStrict- Whether upper bound of range is strict
 
- 
MemberTuplePredicate
public MemberTuplePredicate(RolapCube baseCube, RolapCubeMember member)
Creates a MemberTuplePredicate which evaluates to true for a given member.- Parameters:
 baseCube- base cube for virtual membersmember- Member
 
 - 
 
- 
Method Detail
- 
getConstrainedColumnList
public List<RolapStar.Column> getConstrainedColumnList()
Returns 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.
 
 
- 
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
 
 
- 
minus
public StarPredicate minus(StarPredicate predicate)
Description copied from interface:StarPredicateReturns the logical inverse of this Predicate. The result is a Predicate which holds whenever this predicate holds but the other does not.- Specified by:
 minusin interfaceStarPredicate- Parameters:
 predicate- Predicate- Returns:
 - Combined predicate
 
 
- 
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
 
 
- 
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
 
 
- 
evaluate
public boolean evaluate(List<Object> valueList)
Evaluates a constraint against a list of values.- Specified by:
 evaluatein interfaceStarPredicate- Parameters:
 valueList- List of values, one for each constrained column- Returns:
 - Whether constraint holds for given set of values
 
 
- 
describe
public void describe(StringBuilder buf)
Description copied from interface:StarPredicateAppends a description of this predicate to aStringBuilder. For example:- =any
 - =5
 - in (2, 4, 6)
 
- Specified by:
 describein interfaceStarPredicate- Parameters:
 buf- Builder to append to
 
- 
toSql
public void toSql(SqlQuery sqlQuery, StringBuilder buf)
- Specified by:
 toSqlin interfaceStarPredicate
 
 - 
 
 -