Interface MemberSource
-
- All Known Subinterfaces:
mondrian.rolap.MemberReader,RolapCubeHierarchy.RolapCubeHierarchyMemberReader
- All Known Implementing Classes:
NoCacheMemberReader,RolapCubeHierarchy.CacheRolapCubeHierarchyMemberReader,RolapCubeHierarchy.NoCacheRolapCubeHierarchyMemberReader,RolapCubeHierarchy.RolapCubeSqlMemberSource,SmartMemberReader,SubstitutingMemberReader
public interface MemberSourceAMemberSourcehas the basic operations to read the members of ahierarchy.A
MemberSourcemay optionally support writeback to aMemberCache. During the initialization of aMemberSource, the consumer callssetCache(mondrian.rolap.MemberCache); the return value indicates whether theMemberSourcesupports cache-writeback.A custom member reader is a user-defined class which implements the operations to retrieve members. It either implements the
MemberSourceinterface, or the derived interfaceMemberReader, which has more operations. In addition to the interface methods, the class must have a constructor which takes parameters(and throws no exceptions. To declare a hierarchy based upon the class, use theRolapHierarchy,Properties)memberReaderClassattribute of the<Hierarchy>element in your XML schema file; thepropertiesconstructor parameter is populated from any<Param name="..." value="..."> child elements. - Since:
- 21 December, 2001
- Author:
- jhyde
- See Also:
MemberReader,MemberCache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RolapHierarchygetHierarchy()Returns the hierarchy that this source is reading for.voidgetMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children)Returns all members which are a child of one of the members inparentMembers, sorted by ordinal.voidgetMemberChildren(RolapMember parentMember, List<RolapMember> children)Writes all childrenparentMembertochildren.intgetMemberCount()Returns an estimate of number of members in this hierarchy.List<RolapMember>getMembers()Returns all members of this hierarchy, sorted by ordinal.List<RolapMember>getRootMembers()Returns all members of this hierarchy which do not have a parent, sorted by ordinal.RolapMemberlookupMember(List<Id.Segment> uniqueNameParts, boolean failIfNotFound)Finds a member based upon its unique name.booleansetCache(mondrian.rolap.MemberCache cache)Sets the cache which thisMemberSourcewill write to.
-
-
-
Method Detail
-
getHierarchy
RolapHierarchy getHierarchy()
Returns the hierarchy that this source is reading for.
-
setCache
boolean setCache(mondrian.rolap.MemberCache cache)
Sets the cache which thisMemberSourcewill write to.Cache-writeback is optional (for example,
SqlMemberSourcesupports it, andArrayMemberSourcedoes not), and the return value from this method indicates whether this object supports it.If this method returns
true, thegetMembers(),getRootMembers()andgetMemberChildren(mondrian.rolap.RolapMember, java.util.List<mondrian.rolap.RolapMember>)methods must write to the cache, in addition to returning members as a return value.- Parameters:
cache- TheMemberCachewhich the caller would like thisMemberSourceto write to.- Returns:
- Whether this
MemberSourcesupports cache-writeback.
-
getMembers
List<RolapMember> getMembers()
Returns all members of this hierarchy, sorted by ordinal.If this object
supports cache-writeaback, also writes these members to the cache.
-
getRootMembers
List<RolapMember> getRootMembers()
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.- Returns:
ListofRolapMembers
-
getMemberChildren
void getMemberChildren(RolapMember parentMember, List<RolapMember> children)
Writes all childrenparentMembertochildren.If this object
supports cache-writeback, also writes these members to the cache.
-
getMemberChildren
void getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children)
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.
-
getMemberCount
int getMemberCount()
Returns an estimate of number of members in this hierarchy.
-
lookupMember
RolapMember lookupMember(List<Id.Segment> uniqueNameParts, boolean failIfNotFound)
Finds a member based upon its unique name.
-
-