|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.rolap.DelegatingMemberReader mondrian.rolap.SubstitutingMemberReader
public abstract class SubstitutingMemberReader
Implementation of MemberReader
which replaces given members
with a substitute.
Derived classes must implement the DelegatingMemberReader.substitute(RolapMember)
and
DelegatingMemberReader.desubstitute(RolapMember)
methods.
Field Summary |
---|
Fields inherited from class mondrian.rolap.DelegatingMemberReader |
---|
memberReader |
Constructor Summary | |
---|---|
SubstitutingMemberReader(MemberReader memberReader)
Creates a SubstitutingMemberReader. |
Method Summary | |
---|---|
int |
compare(RolapMember m1,
RolapMember m2,
boolean siblingsAreEqual)
Compares two members according to their order in a prefix ordered traversal. |
RolapMember |
getDefaultMember()
|
RolapHierarchy |
getHierarchy()
Returns the hierarchy that this source is reading for. |
RolapMember |
getLeadMember(RolapMember member,
int n)
Returns the member n after member in the same
level (or before, if n is negative). |
TupleReader.MemberBuilder |
getMemberBuilder()
|
void |
getMemberChildren(List<RolapMember> parentMembers,
List<RolapMember> children)
Returns all members which are a child of one of the members in parentMembers , sorted by ordinal. |
void |
getMemberChildren(List<RolapMember> parentMembers,
List<RolapMember> children,
MemberChildrenConstraint constraint)
Populates a list of the children of a given set of Members, optionally applying a constraint. |
void |
getMemberChildren(RolapMember parentMember,
List<RolapMember> children)
Writes all children parentMember to children . |
void |
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 between startMember and
endMember into list . |
List<RolapMember> |
getMembers()
Returns all members of this hierarchy, sorted by ordinal. |
List<RolapMember> |
getMembersInLevel(RolapLevel level,
int startOrdinal,
int endOrdinal)
Returns all of the members in level whose ordinal lies
between startOrdinal and endOrdinal . |
List<RolapMember> |
getMembersInLevel(RolapLevel level,
int startOrdinal,
int endOrdinal,
TupleConstraint constraint)
Returns the members in the given Level, optionally between a range of ordinals and applying a constraint. |
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(MemberCache cache)
Sets the cache which this MemberSource will write to. |
Methods inherited from class mondrian.rolap.DelegatingMemberReader |
---|
desubstitute, getLevelMemberCount, substitute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
SubstitutingMemberReader(MemberReader memberReader)
memberReader
- Parent member readerMethod Detail |
---|
public RolapMember getLeadMember(RolapMember member, int n)
MemberReader
n
after member
in the same
level (or before, if n
is negative).
Returns Hierarchy.getNullMember()
if we run off the beginning or
end of the level.
getLeadMember
in interface MemberReader
getLeadMember
in class DelegatingMemberReader
public List<RolapMember> getMembersInLevel(RolapLevel level, int startOrdinal, int endOrdinal)
MemberReader
level
whose ordinal lies
between startOrdinal
and endOrdinal
.
If this object
supports cache-writeback
, also
writes these members to the cache.
getMembersInLevel
in interface MemberReader
getMembersInLevel
in class DelegatingMemberReader
List
of RolapMember
public void getMemberRange(RolapLevel level, RolapMember startMember, RolapMember endMember, List<RolapMember> list)
MemberReader
startMember
and
endMember
into list
.
getMemberRange
in interface MemberReader
getMemberRange
in class DelegatingMemberReader
public int compare(RolapMember m1, RolapMember m2, boolean siblingsAreEqual)
MemberReader
siblingsAreEqual
, then two members with the
same parent will compare equal.
compare
in interface MemberReader
compare
in class DelegatingMemberReader
siblingsAreEqual
and
m1 and m2 have the same parentpublic RolapHierarchy getHierarchy()
MemberSource
getHierarchy
in interface MemberSource
getHierarchy
in class DelegatingMemberReader
public boolean setCache(MemberCache cache)
MemberSource
MemberSource
will write to.
Cache-writeback is optional (for example, SqlMemberSource
supports it, and ArrayMemberSource
does not), and the return
value from this method indicates whether this object supports it.
If this method returns true
, the MemberSource.getMembers()
,
MemberSource.getRootMembers()
and MemberSource.getMemberChildren(mondrian.rolap.RolapMember, java.util.List
methods must
write to the cache, in addition to returning members as a return value.
setCache
in interface MemberSource
setCache
in class DelegatingMemberReader
cache
- The MemberCache
which the caller would like
this MemberSource
to write to.
MemberSource
supports cache-writeback.public List<RolapMember> getMembers()
MemberSource
If this object supports cache-writeaback
, also
writes these members to the cache.
getMembers
in interface MemberSource
getMembers
in class DelegatingMemberReader
public List<RolapMember> getRootMembers()
MemberSource
If this object supports cache-writeback
, also
writes these members to the cache.
getRootMembers
in interface MemberSource
getRootMembers
in class DelegatingMemberReader
List
of RolapMember
spublic void getMemberChildren(RolapMember parentMember, List<RolapMember> children)
MemberSource
parentMember
to children
.
If this object supports cache-writeback
, also
writes these members to the cache.
getMemberChildren
in interface MemberSource
getMemberChildren
in class DelegatingMemberReader
public void getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children)
MemberSource
parentMembers
, sorted by ordinal.
If this object supports cache-writeaback
, also
writes these members to the cache.
getMemberChildren
in interface MemberSource
getMemberChildren
in class DelegatingMemberReader
public int getMemberCount()
MemberSource
getMemberCount
in interface MemberSource
getMemberCount
in class DelegatingMemberReader
public RolapMember lookupMember(List<Id.Segment> uniqueNameParts, boolean failIfNotFound)
MemberSource
lookupMember
in interface MemberSource
lookupMember
in class DelegatingMemberReader
public void getMemberChildren(RolapMember member, List<RolapMember> children, MemberChildrenConstraint constraint)
MemberReader
getMemberChildren
in interface MemberReader
getMemberChildren
in class DelegatingMemberReader
member
- Members whose children to findchildren
- List to populate with membersconstraint
- Constraintpublic void getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint)
MemberReader
getMemberChildren
in interface MemberReader
getMemberChildren
in class DelegatingMemberReader
parentMembers
- List of members whose children to findchildren
- List to populate with membersconstraint
- Constraintpublic List<RolapMember> getMembersInLevel(RolapLevel level, int startOrdinal, int endOrdinal, TupleConstraint constraint)
MemberReader
getMembersInLevel
in interface MemberReader
getMembersInLevel
in class DelegatingMemberReader
level
- LevelstartOrdinal
- Ordinal of first member to retrieveendOrdinal
- Ordinal of last member to upper boundconstraint
- Constraint
public RolapMember getDefaultMember()
getDefaultMember
in interface MemberReader
getDefaultMember
in class DelegatingMemberReader
public RolapMember getMemberParent(RolapMember member)
getMemberParent
in interface MemberReader
getMemberParent
in class DelegatingMemberReader
public TupleReader.MemberBuilder getMemberBuilder()
getMemberBuilder
in interface MemberReader
getMemberBuilder
in class DelegatingMemberReader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |