Class SubstitutingMemberReader
- All Implemented Interfaces:
MemberSource
MemberReader
which replaces given members
with a substitute.
Derived classes must implement the substitute(RolapMember)
and
desubstitute(RolapMember)
methods.
- Since:
- Oct 5, 2007
- Author:
- jhyde
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(RolapMember m1, RolapMember m2, boolean siblingsAreEqual) int
countMemberChildren
(Member member, List<RolapMember> children, MemberChildrenConstraint constraint) desubstitute
(RolapMember member) Returns the hierarchy that this source is reading for.getLeadMember
(RolapMember member, int n) int
getLevelMemberCount
(RolapLevel level) getMemberByKey
(RolapLevel level, List<Comparable> keyValues) void
getMemberChildren
(List<RolapMember> parentMembers, List<RolapMember> children) Returns all members which are a child of one of the members inparentMembers
, sorted by ordinal.getMemberChildren
(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint) void
getMemberChildren
(RolapMember parentMember, List<RolapMember> children) Writes all childrenparentMember
tochildren
.getMemberChildren
(RolapMember member, List<RolapMember> children, MemberChildrenConstraint constraint) int
Returns an estimate of number of members in this hierarchy.getMemberParent
(RolapMember member) void
getMemberRange
(RolapLevel level, RolapMember startMember, RolapMember endMember, List<RolapMember> list) Returns all members of this hierarchy, sorted by ordinal.getMembersInLevel
(RolapLevel level) getMembersInLevel
(RolapLevel level, TupleConstraint constraint) Returns all members of this hierarchy which do not have a parent, sorted by ordinal.lookupMember
(List<Id.Segment> uniqueNameParts, boolean failIfNotFound) Finds a member based upon its unique name.boolean
setCache
(mondrian.rolap.MemberCache cache) Sets the cache which thisMemberSource
will write to.substitute
(RolapMember member)
-
Field Details
-
memberReader
protected final mondrian.rolap.MemberReader memberReader
-
-
Method Details
-
getLeadMember
-
getMembersInLevel
-
getMemberRange
public void getMemberRange(RolapLevel level, RolapMember startMember, RolapMember endMember, List<RolapMember> list) -
compare
-
getHierarchy
Description copied from interface:MemberSource
Returns the hierarchy that this source is reading for.- Specified by:
getHierarchy
in interfaceMemberSource
-
setCache
public boolean setCache(mondrian.rolap.MemberCache cache) Description copied from interface:MemberSource
Sets the cache which thisMemberSource
will write to.Cache-writeback is optional (for example,
SqlMemberSource
supports it, andArrayMemberSource
does not), and the return value from this method indicates whether this object supports it.If this method returns
true
, theMemberSource.getMembers()
,MemberSource.getRootMembers()
andMemberSource.getMemberChildren(mondrian.rolap.RolapMember, java.util.List<mondrian.rolap.RolapMember>)
methods must write to the cache, in addition to returning members as a return value.- Specified by:
setCache
in interfaceMemberSource
- Parameters:
cache
- TheMemberCache
which the caller would like thisMemberSource
to write to.- Returns:
- Whether this
MemberSource
supports cache-writeback.
-
getMembers
Description copied from interface:MemberSource
Returns all members of this hierarchy, sorted by ordinal.If this object
supports cache-writeaback
, also writes these members to the cache.- Specified by:
getMembers
in interfaceMemberSource
-
getRootMembers
Description copied from interface:MemberSource
Returns all members of this hierarchy which do not have a parent, sorted by ordinal.If this object
supports cache-writeback
, also writes these members to the cache.- Specified by:
getRootMembers
in interfaceMemberSource
- Returns:
List
ofRolapMember
s
-
getMemberChildren
Description copied from interface:MemberSource
Writes all childrenparentMember
tochildren
.If this object
supports cache-writeback
, also writes these members to the cache.- Specified by:
getMemberChildren
in interfaceMemberSource
-
getMemberChildren
Description copied from interface:MemberSource
Returns all members which are a child of one of the members inparentMembers
, sorted by ordinal.If this object
supports cache-writeaback
, also writes these members to the cache.- Specified by:
getMemberChildren
in interfaceMemberSource
-
getMemberCount
public int getMemberCount()Description copied from interface:MemberSource
Returns an estimate of number of members in this hierarchy.- Specified by:
getMemberCount
in interfaceMemberSource
-
lookupMember
Description copied from interface:MemberSource
Finds a member based upon its unique name.- Specified by:
lookupMember
in interfaceMemberSource
-
getMemberChildren
public Map<? extends Member,Access> getMemberChildren(RolapMember member, List<RolapMember> children, MemberChildrenConstraint constraint) -
getMemberChildren
public Map<? extends Member,Access> getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint) -
getMembersInLevel
-
getDefaultMember
-
getMemberParent
-
getMemberBuilder
-
substitute
-
desubstitute
-
getMemberByKey
-
countMemberChildren
public int countMemberChildren(Member member, List<RolapMember> children, MemberChildrenConstraint constraint) -
getLevelMemberCount
-