Class SqlConstraintFactory


  • public class SqlConstraintFactory
    extends Object
    Creates the right constraint for common tasks.
    Since:
    Nov 21, 2005
    Author:
    av
    • Method Detail

      • setNativeNonEmptyValue

        public static void setNativeNonEmptyValue()
      • 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-empty
        levels - levels being referenced in the current context
        Returns:
        Constraint
      • 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