Package mondrian.rolap
Class RolapCubeHierarchy.NoCacheRolapCubeHierarchyMemberReader
- java.lang.Object
-
- mondrian.rolap.NoCacheMemberReader
-
- mondrian.rolap.RolapCubeHierarchy.NoCacheRolapCubeHierarchyMemberReader
-
- All Implemented Interfaces:
MemberSource
,RolapCubeHierarchy.RolapCubeHierarchyMemberReader
- Enclosing class:
- RolapCubeHierarchy
public class RolapCubeHierarchy.NoCacheRolapCubeHierarchyMemberReader extends NoCacheMemberReader implements RolapCubeHierarchy.RolapCubeHierarchyMemberReader
Same asRolapCubeHierarchy.RolapCubeHierarchyMemberReader
but without caching anything.
-
-
Field Summary
Fields Modifier and Type Field Description protected RolapCubeHierarchy.RolapCubeSqlMemberSource
cubeSource
cubeSource is passed as our member builderprotected MemberCacheHelper
rolapCubeCacheHelper
this cache caches RolapCubeMembers that are light wrappers around shared and non-shared Hierarchy RolapMembers.
-
Constructor Summary
Constructors Constructor Description NoCacheRolapCubeHierarchyMemberReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compare(RolapMember m1, RolapMember m2, boolean siblingsAreEqual)
Compares two members according to their order in a prefix ordered traversal.int
countMemberChildren(Member member, List<RolapMember> children, MemberChildrenConstraint constraint)
RolapMember
desubstitute(RolapMember member)
Returns the member which was substituted.RolapMember
getDefaultMember()
RolapMember
getLeadMember(RolapMember member, int n)
Returns the membern
aftermember
in the same level (or before, ifn
is negative).int
getLevelMemberCount(RolapLevel level)
Returns the number of members in this level.TupleReader.MemberBuilder
getMemberBuilder()
RolapMember
getMemberByKey(RolapLevel level, List<Comparable> keyValues)
Looks up a member by its key value.Map<? extends Member,Access>
getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint)
Map<? extends Member,Access>
getMemberChildren(RolapMember member, List<RolapMember> children, MemberChildrenConstraint constraint)
Populates a list of the children of a Member, optionally applying a constraint.int
getMemberCount()
Returns an estimate of number of members in this hierarchy.RolapMember
getMemberParent(RolapMember member)
void
getMemberRange(RolapLevel level, RolapMember startMember, RolapMember endMember, List<RolapMember> list)
Writes all members betweenstartMember
andendMember
intolist
.List<RolapMember>
getMembersInLevel(RolapLevel level)
Returns all of the members inlevel
whose ordinal lies betweenstartOrdinal
andendOrdinal
.List<RolapMember>
getMembersInLevel(RolapLevel level, TupleConstraint constraint)
MemberCacheHelper
getRolapCubeMemberCacheHelper()
List<RolapMember>
getRootMembers()
Returns all members of this hierarchy which do not have a parent, sorted by ordinal.RolapCubeMember
lookupCubeMember(RolapCubeMember parent, RolapMember member, RolapCubeLevel level)
protected void
readMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint)
Reads the children ofmember
intoresult
.RolapMember
substitute(RolapMember member)
Substitutes a given member.-
Methods inherited from class mondrian.rolap.NoCacheMemberReader
compare, desubstitute, getChildrenFromCache, getDefaultMember, getHierarchy, getLeadMember, getLevelMemberCount, getLevelMembersFromCache, getMember, getMember, getMemberByKey, getMemberChildren, getMemberChildren, getMemberChildren, getMemberParent, getMemberRange, getMembers, getMembersInLevel, isMutable, lookupMember, makeKey, putChildren, putChildren, putMember, removeMember, removeMemberAndDescendants, setCache, substitute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface mondrian.rolap.MemberSource
getHierarchy, getMemberChildren, getMemberChildren, getMembers, lookupMember, setCache
-
-
-
-
Field Detail
-
cubeSource
protected final RolapCubeHierarchy.RolapCubeSqlMemberSource cubeSource
cubeSource is passed as our member builder
-
rolapCubeCacheHelper
protected MemberCacheHelper rolapCubeCacheHelper
this cache caches RolapCubeMembers that are light wrappers around shared and non-shared Hierarchy RolapMembers. The inherited cacheHelper object contains non-shared hierarchy RolapMembers. non-shared hierarchy RolapMembers are created when a member lookup involves the Cube's fact table.
-
-
Method Detail
-
getMemberBuilder
public TupleReader.MemberBuilder getMemberBuilder()
- Overrides:
getMemberBuilder
in classNoCacheMemberReader
-
getRolapCubeMemberCacheHelper
public MemberCacheHelper getRolapCubeMemberCacheHelper()
- Specified by:
getRolapCubeMemberCacheHelper
in interfaceRolapCubeHierarchy.RolapCubeHierarchyMemberReader
-
getRootMembers
public List<RolapMember> 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
- Overrides:
getRootMembers
in classNoCacheMemberReader
- Returns:
List
ofRolapMember
s
-
readMemberChildren
protected void readMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint)
Description copied from class:NoCacheMemberReader
Reads the children ofmember
intoresult
.- Overrides:
readMemberChildren
in classNoCacheMemberReader
- Parameters:
parentMembers
- Members whose children to readchildren
- Children are written here, in orderconstraint
- restricts the returned members if possible (optional optimization)
-
getMemberChildren
public Map<? extends Member,Access> getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint)
- Overrides:
getMemberChildren
in classNoCacheMemberReader
-
getMembersInLevel
public List<RolapMember> getMembersInLevel(RolapLevel level, TupleConstraint constraint)
- Overrides:
getMembersInLevel
in classNoCacheMemberReader
-
lookupCubeMember
public RolapCubeMember lookupCubeMember(RolapCubeMember parent, RolapMember member, RolapCubeLevel level)
- Specified by:
lookupCubeMember
in interfaceRolapCubeHierarchy.RolapCubeHierarchyMemberReader
-
getMemberCount
public int getMemberCount()
Description copied from interface:MemberSource
Returns an estimate of number of members in this hierarchy.- Specified by:
getMemberCount
in interfaceMemberSource
- Overrides:
getMemberCount
in classNoCacheMemberReader
-
countMemberChildren
public int countMemberChildren(Member member, List<RolapMember> children, MemberChildrenConstraint constraint)
- Overrides:
countMemberChildren
in classNoCacheMemberReader
-
getLeadMember
public abstract RolapMember getLeadMember(RolapMember member, int n)
Returns the membern
aftermember
in the same level (or before, ifn
is negative). ReturnsHierarchy.getNullMember()
if we run off the beginning or end of the level.
-
getMembersInLevel
public abstract List<RolapMember> getMembersInLevel(RolapLevel level)
Returns all of the members inlevel
whose ordinal lies betweenstartOrdinal
andendOrdinal
.If this object
supports cache-writeback
, also writes these members to the cache.- Returns:
List
ofRolapMember
-
getMemberRange
public abstract void getMemberRange(RolapLevel level, RolapMember startMember, RolapMember endMember, List<RolapMember> list)
Writes all members betweenstartMember
andendMember
intolist
.
-
compare
public abstract int compare(RolapMember m1, RolapMember m2, boolean siblingsAreEqual)
Compares two members according to their order in a prefix ordered traversal. IfsiblingsAreEqual
, then two members with the same parent will compare equal.- Returns:
- less than zero if m1 occurs before m2,
greater than zero if m1 occurs after m2,
zero if m1 is equal to m2, or if
siblingsAreEqual
and m1 and m2 have the same parent
-
getMemberChildren
public abstract Map<? extends Member,Access> getMemberChildren(RolapMember member, List<RolapMember> children, MemberChildrenConstraint constraint)
Populates a list of the children of a Member, optionally applying a constraint.- Parameters:
member
- Members whose children to findchildren
- List to populate with membersconstraint
- Constraint- Returns:
- After populating the list passed as an argument,
this method returns a map of the members it just populated
along with the Access information applicable. If no access
control applies to the member, the map will contain
null
values.
-
getLevelMemberCount
public abstract int getLevelMemberCount(RolapLevel level)
Returns the number of members in this level.- Parameters:
level
- Level- Returns:
- number of members in level
-
getDefaultMember
public abstract RolapMember getDefaultMember()
-
getMemberParent
public abstract RolapMember getMemberParent(RolapMember member)
-
substitute
public abstract RolapMember substitute(RolapMember member)
Substitutes a given member. If member is null, returns null.This method is called whenever a member is returned from the wrapped member reader and is to be returned to the caller. You could say that it translates 'to caller space'.
- Parameters:
member
- Member- Returns:
- Substitute member
-
desubstitute
public abstract RolapMember desubstitute(RolapMember member)
Returns the member which was substituted. If member is null, returns null.This method is called whenever the caller passes a member into a method and needs to be passed to a method on the wrapped member reader. You could say that it translates 'from caller space'.
- Parameters:
member
- Member- Returns:
- Internal member
-
getMemberByKey
public abstract RolapMember getMemberByKey(RolapLevel level, List<Comparable> keyValues)
Looks up a member by its key value.- Parameters:
level
- LevelkeyValues
- Key values- Returns:
- Member, or null
-
-