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 MemberSource
AMemberSource
has the basic operations to read the members of ahierarchy
.A
MemberSource
may optionally support writeback to aMemberCache
. During the initialization of aMemberSource
, the consumer callssetCache(mondrian.rolap.MemberCache)
; the return value indicates whether theMemberSource
supports cache-writeback.A custom member reader is a user-defined class which implements the operations to retrieve members. It either implements the
MemberSource
interface, 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
)memberReaderClass
attribute of the<Hierarchy>
element in your XML schema file; theproperties
constructor 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 RolapHierarchy
getHierarchy()
Returns the hierarchy that this source is reading for.void
getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children)
Returns all members which are a child of one of the members inparentMembers
, sorted by ordinal.void
getMemberChildren(RolapMember parentMember, List<RolapMember> children)
Writes all childrenparentMember
tochildren
.int
getMemberCount()
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.RolapMember
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.
-
-
-
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 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
, 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
- TheMemberCache
which the caller would like thisMemberSource
to write to.- Returns:
- Whether this
MemberSource
supports 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:
List
ofRolapMember
s
-
getMemberChildren
void getMemberChildren(RolapMember parentMember, List<RolapMember> children)
Writes all childrenparentMember
tochildren
.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.
-
-