Package mondrian.rolap
Class SqlConstraintFactory
java.lang.Object
mondrian.rolap.SqlConstraintFactory
Creates the right constraint for common tasks.
- Since:
- Nov 21, 2005
- Author:
- av
-
Method Summary
Modifier and TypeMethodDescriptiongetChildByNameConstraint(RolapMember parent, Id.NameSegment childName) getChildrenByNamesConstraint(RolapMember parent, List<Id.NameSegment> childNames) 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.getLevelMembersConstraint(Evaluator context) getLevelMembersConstraint(Evaluator context, Level[] levels) Returns a constraint that restricts the members of a level to those that are non-empty in the given context.getMemberChildrenConstraint(Evaluator context) static SqlConstraintFactoryinstance()static void
-
Method Details
-
instance
-
setNativeNonEmptyValue
public static void setNativeNonEmptyValue() -
getMemberChildrenConstraint
-
getLevelMembersConstraint
-
getLevelMembersConstraint
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 context- Returns:
- Constraint
-
getChildByNameConstraint
public MemberChildrenConstraint getChildByNameConstraint(RolapMember parent, Id.NameSegment childName) -
getChildrenByNamesConstraint
public MemberChildrenConstraint getChildrenByNamesConstraint(RolapMember parent, List<Id.NameSegment> childNames) -
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
-