Package mondrian.olap
Class RoleImpl.DelegatingHierarchyAccess
java.lang.Object
mondrian.olap.RoleImpl.DelegatingHierarchyAccess
- All Implemented Interfaces:
Role.AllHierarchyAccess
,Role.HierarchyAccess
- Enclosing class:
- RoleImpl
public abstract static class RoleImpl.DelegatingHierarchyAccess
extends Object
implements Role.AllHierarchyAccess
Implementation of
Role.HierarchyAccess
that
delegates all methods to an underlying hierarchy access.-
Field Summary
-
Constructor Summary
ConstructorDescriptionDelegatingHierarchyAccess
(Role.HierarchyAccess hierarchyAccess) Creates a DelegatingHierarchyAccess. -
Method Summary
Modifier and TypeMethodDescriptionReturns the access to whole hierarchy.Returns the access the current role has to a given member.int
Returns the depth of the lowest level to which the current Role has access.Returns the policy by which cell values are calculated if not all of a member's children are visible.int
Returns the depth of the highest level to which the current Role has access.boolean
hasInaccessibleDescendants
(Member member) Returnstrue
if at least one of the descendants of the given Member is inaccessible to this Role.
-
Field Details
-
hierarchyAccess
-
-
Constructor Details
-
DelegatingHierarchyAccess
Creates a DelegatingHierarchyAccess.- Parameters:
hierarchyAccess
- Underlying hierarchy access
-
-
Method Details
-
getAccess
Description copied from interface:Role.HierarchyAccess
Returns the access the current role has to a given member.Visibility is:
Access.NONE
if member is not visible,Access.ALL
if member and all children are visible,Access.CUSTOM
if some of the children are not visible.
For these purposes, children which are below the bottom level are regarded as visible.
- Specified by:
getAccess
in interfaceRole.HierarchyAccess
- Parameters:
member
- Member.- Returns:
- Return current role's access to member.
-
getTopLevelDepth
public int getTopLevelDepth()Description copied from interface:Role.HierarchyAccess
Returns the depth of the highest level to which the current Role has access. The 'all' level, if present, has a depth of zero.- Specified by:
getTopLevelDepth
in interfaceRole.HierarchyAccess
- Returns:
- Returns depth of the highest accessible level.
-
getBottomLevelDepth
public int getBottomLevelDepth()Description copied from interface:Role.HierarchyAccess
Returns the depth of the lowest level to which the current Role has access. The 'all' level, if present, has a depth of zero.- Specified by:
getBottomLevelDepth
in interfaceRole.HierarchyAccess
- Returns:
- Returns depth of the lowest accessible level.
-
getRollupPolicy
Description copied from interface:Role.HierarchyAccess
Returns the policy by which cell values are calculated if not all of a member's children are visible.- Specified by:
getRollupPolicy
in interfaceRole.HierarchyAccess
- Returns:
- Returns rollup policy.
-
hasInaccessibleDescendants
Description copied from interface:Role.HierarchyAccess
Returnstrue
if at least one of the descendants of the given Member is inaccessible to this Role.Descendants which are inaccessible because they are below the bottom level are ignored.
- Specified by:
hasInaccessibleDescendants
in interfaceRole.HierarchyAccess
- Parameters:
member
- Member- Returns:
- Returns whether a descendant is inaccessible.
-
getAccess
Description copied from interface:Role.AllHierarchyAccess
Returns the access to whole hierarchy.- Specified by:
getAccess
in interfaceRole.AllHierarchyAccess
- Returns:
- the access to the hierarchy.
-