Package mondrian.rolap
Class DefaultMemberChildrenConstraint
- java.lang.Object
-
- mondrian.rolap.DefaultMemberChildrenConstraint
-
- All Implemented Interfaces:
MemberChildrenConstraint,SqlConstraint
public class DefaultMemberChildrenConstraint extends Object implements MemberChildrenConstraint
Restricts the SQL result set to the parent member of a MemberChildren query. If called with a calculated member an exception will be thrown.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultMemberChildrenConstraint()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLevelConstraint(SqlQuery query, RolapCube baseCube, AggStar aggStar, RolapLevel level)Will be called once for the level that contains the children of a Member.Children query.voidaddMemberConstraint(SqlQuery sqlQuery, RolapCube baseCube, AggStar aggStar, List<RolapMember> parents)Modifies aMember.Childrenquery so that (all or some) children of all parent members contained inparentswill be returned in the result set.voidaddMemberConstraint(SqlQuery sqlQuery, RolapCube baseCube, AggStar aggStar, RolapMember parent)Modifies aMember.Childrenquery so that only the children ofparentwill be returned in the result set.ObjectgetCacheKey()Returns a key that becomes part of the key for caching the result of the SQL query.static MemberChildrenConstraintinstance()StringtoString()
-
-
-
Method Detail
-
addMemberConstraint
public void addMemberConstraint(SqlQuery sqlQuery, RolapCube baseCube, AggStar aggStar, RolapMember parent)
Description copied from interface:MemberChildrenConstraintModifies aMember.Childrenquery so that only the children ofparentwill be returned in the result set.- Specified by:
addMemberConstraintin interfaceMemberChildrenConstraint- Parameters:
sqlQuery- the query to modifybaseCube- base cube for virtual membersaggStar- Aggregate star, if we are reading from an aggregate table,parent- the parent member that restricts the returned children
-
addMemberConstraint
public void addMemberConstraint(SqlQuery sqlQuery, RolapCube baseCube, AggStar aggStar, List<RolapMember> parents)
Description copied from interface:MemberChildrenConstraintModifies aMember.Childrenquery so that (all or some) children of all parent members contained inparentswill be returned in the result set.- Specified by:
addMemberConstraintin interfaceMemberChildrenConstraint- Parameters:
sqlQuery- Query to modifybaseCube- Base cube for virtual membersaggStar- Aggregate table, or null if query is against fact tableparents- List of parent members that restrict the returned children
-
addLevelConstraint
public void addLevelConstraint(SqlQuery query, RolapCube baseCube, AggStar aggStar, RolapLevel level)
Description copied from interface:MemberChildrenConstraintWill be called once for the level that contains the children of a Member.Children query. If the condition requires so, it may join the levels table to the fact table.- Specified by:
addLevelConstraintin interfaceMemberChildrenConstraint- Parameters:
query- the query to modifybaseCube- base cube for virtual membersaggStar- Aggregate table, or null if query is against fact tablelevel- the level that contains the children
-
getCacheKey
public Object getCacheKey()
Description copied from interface:SqlConstraintReturns a key that becomes part of the key for caching the result of the SQL query. So SqlConstraint instances that produce the same SQL resultset must return equal keys in terms of equal() and hashCode().- Specified by:
getCacheKeyin interfaceSqlConstraint- Returns:
- valid key or null to prevent the result from being cached
-
instance
public static MemberChildrenConstraint instance()
-
-