Package 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MemberChildrenConstraint
getChildByNameConstraint(RolapMember parent, Id.NameSegment childName)
MemberChildrenConstraint
getChildrenByNamesConstraint(RolapMember parent, List<Id.NameSegment> childNames)
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.TupleConstraint
getLevelMembersConstraint(Evaluator context)
TupleConstraint
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.MemberChildrenConstraint
getMemberChildrenConstraint(Evaluator context)
static SqlConstraintFactory
instance()
static void
setNativeNonEmptyValue()
-
-
-
Method Detail
-
instance
public static SqlConstraintFactory instance()
-
setNativeNonEmptyValue
public static void setNativeNonEmptyValue()
-
getMemberChildrenConstraint
public MemberChildrenConstraint getMemberChildrenConstraint(Evaluator context)
-
getLevelMembersConstraint
public TupleConstraint getLevelMembersConstraint(Evaluator context)
-
getLevelMembersConstraint
public TupleConstraint 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. 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
-
-