|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SchemaReader
A SchemaReader
queries schema objects (Schema
,
Cube
, Dimension
, Hierarchy
, Level
,
Member
).
It is generally created using Connection.getSchemaReader()
.
Method Summary | |
---|---|
int |
compareMembersHierarchically(Member m1,
Member m2)
Compares a pair of Member s according to their order in a prefix
traversal. |
Member |
getCalculatedMember(List<Id.Segment> nameParts)
Looks up a calculated member by name. |
List<Member> |
getCalculatedMembers()
Returns the list of calculated members. |
List<Member> |
getCalculatedMembers(Hierarchy hierarchy)
Returns a list of calculated members in a given hierarchy. |
List<Member> |
getCalculatedMembers(Level level)
Returns a list of calculated members in a given level. |
int |
getChildrenCountFromCache(Member member)
Returns number of children parent of a member, if the information can be retrieved from cache. |
Cube[] |
getCubes()
Returns the list of accessible cubes. |
DataSource |
getDataSource()
|
OlapElement |
getElementChild(OlapElement parent,
Id.Segment name)
|
OlapElement |
getElementChild(OlapElement parent,
Id.Segment name,
MatchType matchType)
Looks up the child of parent called s ; returns
null if no element is found. |
Member |
getHierarchyDefaultMember(Hierarchy hierarchy)
Returns the default member of a hierarchy. |
List<Level> |
getHierarchyLevels(Hierarchy hierarchy)
Returns the accessible levels of a hierarchy. |
List<Member> |
getHierarchyRootMembers(Hierarchy hierarchy)
Returns an array of the root members of hierarchy . |
Member |
getLeadMember(Member member,
int n)
Returns a member n further along in the same level from
member . |
int |
getLevelCardinality(Level level,
boolean approximate,
boolean materialize)
Returns the number of members in a level, returning an approximation if acceptable. |
List<Member> |
getLevelMembers(Level level,
boolean includeCalculated)
Returns the members of a level, optionally including calculated members. |
List<Member> |
getLevelMembers(Level level,
Evaluator context)
Returns the members of a level, optionally filtering out members which are empty. |
Member |
getMemberByUniqueName(List<Id.Segment> uniqueNameParts,
boolean failIfNotFound)
Finds a member based upon its unique name, requiring an exact match. |
Member |
getMemberByUniqueName(List<Id.Segment> uniqueNameParts,
boolean failIfNotFound,
MatchType matchType)
Finds a member based upon its unique name. |
List<Member> |
getMemberChildren(List<Member> members)
Returns direct children of each element of members . |
List<Member> |
getMemberChildren(List<Member> members,
Evaluator context)
Returns direct children of each element of members
which is not empty in context . |
List<Member> |
getMemberChildren(Member member)
Returns direct children of member . |
List<Member> |
getMemberChildren(Member member,
Evaluator context)
Returns direct children of member , optimized
for NON EMPTY. |
int |
getMemberDepth(Member member)
Returns the depth of a member. |
Member |
getMemberParent(Member member)
Returns the parent of member . |
void |
getMemberRange(Level level,
Member startMember,
Member endMember,
List<Member> list)
Appends to list all members between startMember
and endMember (inclusive) which belong to
level . |
NamedSet |
getNamedSet(List<Id.Segment> nameParts)
Looks up a set by name. |
NativeEvaluator |
getNativeSetEvaluator(FunDef fun,
Exp[] args,
Evaluator evaluator,
Calc calc)
Returns an object which can evaluate an expression in native SQL, or null if this is not possible. |
Parameter |
getParameter(String name)
Returns the definition of a parameter with a given name, or null if not found. |
Role |
getRole()
Returns the access-control profile that this SchemaReader
is implementing. |
boolean |
isDrillable(Member member)
Returns whether a member has visible children. |
boolean |
isVisible(Member member)
Returns whether a member is visible. |
OlapElement |
lookupCompound(OlapElement parent,
List<Id.Segment> names,
boolean failIfNotFound,
int category)
Looks up an MDX object by name. |
OlapElement |
lookupCompound(OlapElement parent,
List<Id.Segment> names,
boolean failIfNotFound,
int category,
MatchType matchType)
Looks up an MDX object by name, specifying how to match if no object exactly matches the name. |
Member |
lookupMemberChildByName(Member parent,
Id.Segment childName)
|
Member |
lookupMemberChildByName(Member parent,
Id.Segment childName,
MatchType matchType)
Finds a child of a member with a given name. |
Member |
substitute(Member member)
Substitutes a member with an equivalent member which enforces the access control policy of this SchemaReader. |
Method Detail |
---|
Role getRole()
SchemaReader
is implementing.
List<Member> getHierarchyRootMembers(Hierarchy hierarchy)
hierarchy
.
hierarchy
- HierarchygetCalculatedMembers(Hierarchy)
int getChildrenCountFromCache(Member member)
int getLevelCardinality(Level level, boolean approximate, boolean materialize)
level
- Levelapproximate
- Whether an approximation is acceptablematerialize
- Whether to go to disk if no approximation for the count
is available and the members are not in cache. If false, returns
Integer.MIN_VALUE
if value is not in cache.Member substitute(Member member)
List<Member> getMemberChildren(Member member)
member
.
List<Member> getMemberChildren(Member member, Evaluator context)
member
, optimized
for NON EMPTY.
If context == null
then
there is no context and all members are returned - then
its identical to getMemberChildren(Member)
.
If context
is not null, the resulting members
may be restricted to those members that have a
non empty row in the fact table for context
.
Wether or not optimization is possible depends
on the SchemaReader implementation.
List<Member> getMemberChildren(List<Member> members)
members
.
members
- Array of members
List<Member> getMemberChildren(List<Member> members, Evaluator context)
members
which is not empty in context
.
members
- Array of memberscontext
- Evaluation context
Member getMemberParent(Member member)
member
.
member
- Member
int getMemberDepth(Member member)
This may not be the same as
member.
for three reasons:getLevel
().
getDepth
()
Member getMemberByUniqueName(List<Id.Segment> uniqueNameParts, boolean failIfNotFound, MatchType matchType)
uniqueNameParts
- Unique name of memberfailIfNotFound
- Whether to throw an error, as opposed to returning
null
, if there is no such member.matchType
- indicates the match mode; if not specified, EXACT
Member getMemberByUniqueName(List<Id.Segment> uniqueNameParts, boolean failIfNotFound)
This method is equivalent to calling
getMemberByUniqueName(java.util.List, boolean, MatchType)
with MatchType.EXACT
.
uniqueNameParts
- Unique name of memberfailIfNotFound
- Whether to throw an error, as opposed to returning
null
, if there is no such member.
OlapElement lookupCompound(OlapElement parent, List<Id.Segment> names, boolean failIfNotFound, int category, MatchType matchType)
Resolves a name such as '[Products].[Product Department].[Produce]' by resolving the components ('Products', and so forth) one at a time.
parent
- Parent element to search innames
- Exploded compound name, such as {"Products",
"Product Department", "Produce"}failIfNotFound
- If the element is not found, determines whether
to return null or throw an errorcategory
- Type of returned element, a Category
value;
Category.Unknown
if it doesn't matter.matchType
- indicates the match mode; if not specified, EXACTOlapElement lookupCompound(OlapElement parent, List<Id.Segment> names, boolean failIfNotFound, int category)
Resolves a name such as '[Products].[Product Department].[Produce]' by resolving the components ('Products', and so forth) one at a time.
parent
- Parent element to search innames
- Exploded compound name, such as {"Products",
"Product Department", "Produce"}failIfNotFound
- If the element is not found, determines whether
to return null or throw an errorcategory
- Type of returned element, a Category
value;
Category.Unknown
if it doesn't matter.Member getCalculatedMember(List<Id.Segment> nameParts)
NamedSet getNamedSet(List<Id.Segment> nameParts)
void getMemberRange(Level level, Member startMember, Member endMember, List<Member> list)
list
all members between startMember
and endMember
(inclusive) which belong to
level
.
Member getLeadMember(Member member, int n)
n
further along in the same level from
member
.
int compareMembersHierarchically(Member m1, Member m2)
Member
s according to their order in a prefix
traversal. (that is, it
is an ancestor or a earlier), is a sibling, or comes later in a prefix
traversal.
m1
is an ancestor, an earlier
sibling of an ancestor, or a descendent of an earlier sibling, of
m2
;
zero if m1
is a sibling of m2
;
a positive integer if m1
comes later in the prefix
traversal then m2
.OlapElement getElementChild(OlapElement parent, Id.Segment name, MatchType matchType)
parent
called s
; returns
null if no element is found.
OlapElement getElementChild(OlapElement parent, Id.Segment name)
List<Member> getLevelMembers(Level level, boolean includeCalculated)
List<Member> getLevelMembers(Level level, Evaluator context)
level
- Levelcontext
- Context for filtering
List<Level> getHierarchyLevels(Hierarchy hierarchy)
Member getHierarchyDefaultMember(Hierarchy hierarchy)
boolean isDrillable(Member member)
boolean isVisible(Member member)
Cube[] getCubes()
List<Member> getCalculatedMembers(Hierarchy hierarchy)
List<Member> getCalculatedMembers(Level level)
List<Member> getCalculatedMembers()
Member lookupMemberChildByName(Member parent, Id.Segment childName, MatchType matchType)
Member lookupMemberChildByName(Member parent, Id.Segment childName)
NativeEvaluator getNativeSetEvaluator(FunDef fun, Exp[] args, Evaluator evaluator, Calc calc)
fun
- Functionargs
- Arguments to the functionevaluator
- Evaluator, provides contextcalc
- Parameter getParameter(String name)
DataSource getDataSource()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |