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 ofRole.HierarchyAccessthat delegates all methods to an underlying hierarchy access.
-
-
Field Summary
Fields Modifier and Type Field Description protected Role.HierarchyAccesshierarchyAccess
-
Constructor Summary
Constructors Constructor Description DelegatingHierarchyAccess(Role.HierarchyAccess hierarchyAccess)Creates a DelegatingHierarchyAccess.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessgetAccess()Returns the access to whole hierarchy.AccessgetAccess(Member member)Returns the access the current role has to a given member.intgetBottomLevelDepth()Returns the depth of the lowest level to which the current Role has access.Role.RollupPolicygetRollupPolicy()Returns the policy by which cell values are calculated if not all of a member's children are visible.intgetTopLevelDepth()Returns the depth of the highest level to which the current Role has access.booleanhasInaccessibleDescendants(Member member)Returnstrueif at least one of the descendants of the given Member is inaccessible to this Role.
-
-
-
Field Detail
-
hierarchyAccess
protected final Role.HierarchyAccess hierarchyAccess
-
-
Constructor Detail
-
DelegatingHierarchyAccess
public DelegatingHierarchyAccess(Role.HierarchyAccess hierarchyAccess)
Creates a DelegatingHierarchyAccess.- Parameters:
hierarchyAccess- Underlying hierarchy access
-
-
Method Detail
-
getAccess
public Access getAccess(Member member)
Description copied from interface:Role.HierarchyAccessReturns the access the current role has to a given member.Visibility is:
Access.NONEif member is not visible,Access.ALLif member and all children are visible,Access.CUSTOMif some of the children are not visible.
For these purposes, children which are below the bottom level are regarded as visible.
- Specified by:
getAccessin interfaceRole.HierarchyAccess- Parameters:
member- Member.- Returns:
- Return current role's access to member.
-
getTopLevelDepth
public int getTopLevelDepth()
Description copied from interface:Role.HierarchyAccessReturns 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:
getTopLevelDepthin interfaceRole.HierarchyAccess- Returns:
- Returns depth of the highest accessible level.
-
getBottomLevelDepth
public int getBottomLevelDepth()
Description copied from interface:Role.HierarchyAccessReturns 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:
getBottomLevelDepthin interfaceRole.HierarchyAccess- Returns:
- Returns depth of the lowest accessible level.
-
getRollupPolicy
public Role.RollupPolicy getRollupPolicy()
Description copied from interface:Role.HierarchyAccessReturns the policy by which cell values are calculated if not all of a member's children are visible.- Specified by:
getRollupPolicyin interfaceRole.HierarchyAccess- Returns:
- Returns rollup policy.
-
hasInaccessibleDescendants
public boolean hasInaccessibleDescendants(Member member)
Description copied from interface:Role.HierarchyAccessReturnstrueif 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:
hasInaccessibleDescendantsin interfaceRole.HierarchyAccess- Parameters:
member- Member- Returns:
- Returns whether a descendant is inaccessible.
-
getAccess
public Access getAccess()
Description copied from interface:Role.AllHierarchyAccessReturns the access to whole hierarchy.- Specified by:
getAccessin interfaceRole.AllHierarchyAccess- Returns:
- the access to the hierarchy.
-
-