mondrian.rolap
Class SqlConstraintFactory
java.lang.Object
mondrian.rolap.SqlConstraintFactory
public class SqlConstraintFactory
- extends Object
Creates the right constraint for common tasks.
- Since:
- Nov 21, 2005
- Author:
- av
-
-
Field Summary |
(package private) boolean |
enabled
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
enabled
boolean enabled
instance
public static SqlConstraintFactory instance()
getMemberChildrenConstraint
public MemberChildrenConstraint getMemberChildrenConstraint(Evaluator context)
getLevelMembersConstraint
public TupleConstraint getLevelMembersConstraint(Evaluator context)
getLevelMembersConstraint
public TupleConstraint getLevelMembersConstraint(Evaluator context,
Level[] levels,
boolean[] satisfied)
- Returns a constraint that restricts the members of a level to those that
are non-empty in the given context. If the constraint cannot be
implemented (say if native constraints are disabled) returns null.
- Parameters:
context
- Context within which members must be non-emptylevels
- levels being referenced in the current contextsatisfied
- Set to false if constraint does not satisfy non-empty
context and caller still has to do it
- Returns:
- Constraint
getChildByNameConstraint
public MemberChildrenConstraint getChildByNameConstraint(RolapMember parent,
Id.Segment childName)
getDescendantsConstraint
public TupleConstraint getDescendantsConstraint(List<RolapMember> parentMembers,
MemberChildrenConstraint mcc)
- Returns a constraint that allows to read all children of multiple parents
at once using a LevelMember query style. This does not work
for parent/child hierarchies.
- Parameters:
parentMembers
- List of parents (all must belong to same level)mcc
- The constraint that would return the children for
each single parent
- Returns:
- constraint