Class EssMemberImpl

java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssMemberImpl
All Implemented Interfaces:
EssMember, EssObject

public class EssMemberImpl extends AbstractEssObject implements EssMember
A member in an Essbase cube.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: EssMember
      Returns the name of the member.
      Specified by:
      getName in interface EssMember
      Specified by:
      getName in interface EssObject
      Returns:
      the member name
    • getDimensionName

      public String getDimensionName()
      Description copied from interface: EssMember
      The dimension this member belongs to.

      Needed wherever a member has to be expressed as part of a cell rather than on its own - a drill-through POV is keyed by dimension, and a grid knows only the member names it is painting.

      Specified by:
      getDimensionName in interface EssMember
      Returns:
      the dimension name
    • getType

      public EssObject.Type getType()
      Description copied from interface: EssObject
      Gets the type of this object.
      Specified by:
      getType in interface EssMember
      Specified by:
      getType in interface EssObject
      Returns:
      the object type
    • getParent

      public EssMember getParent()
      Description copied from interface: EssMember
      Gets the parent member (not implemented yet).
      Specified by:
      getParent in interface EssMember
      Returns:
      the parent member, null if none (it's a dimension)
    • getLevel

      public int getLevel()
      Description copied from interface: EssMember
      Gets the level of the member as indicated by the REST API
      Specified by:
      getLevel in interface EssMember
      Returns:
      the member level
    • getDataStorage

      public EssMember.DataStorage getDataStorage()
      Description copied from interface: EssMember
      How this member's data is held, or EssMember.DataStorage.STORED where the server said nothing - it omits the field entirely for the default rather than naming it, so an absent value is information and not a gap.
      Specified by:
      getDataStorage in interface EssMember
      Returns:
      the member's storage, never null
    • getAliases

      public Map<String,String> getAliases()
      Description copied from interface: EssMember
      This member's alias in every alias table the cube has, by table name.

      Free: the server sends all of them with the member itself, so reading one table's alias for a whole outline costs no requests beyond the ones that fetched the members. Established live - Sample.Basic's 100 comes back with six entries, one per table on that cube.

      A table the member has no alias in is present with a null value rather than absent, so the keys are the cube's alias tables whether or not this member uses them. EssMember.getAlias(String) is the reading that does not care about the difference.

      Specified by:
      getAliases in interface EssMember
      Returns:
      table name to alias, empty if the server sent none
    • getDimensionStorage

      public EssMember.DimensionStorage getDimensionStorage()
      Description copied from interface: EssMember
      Whether this dimension is dense or sparse.

      Only a standard dimension has one. A member below a dimension, and an attribute dimension, both answer EssMember.DimensionStorage.UNSPECIFIED.

      Specified by:
      getDimensionStorage in interface EssMember
      Returns:
      the dimension's storage, never null
    • getDescendantsCount

      public long getDescendantsCount()
      Description copied from interface: EssMember
      How many members sit below this one, at every level.

      Reported by the outline with the member itself, so it costs nothing - which makes it the way to find out how big a walk would be before starting one. Zero for a leaf, and for a member read from a source that didn't report it.

      Specified by:
      getDescendantsCount in interface EssMember
      Returns:
      the descendant count
    • getDimensionType

      public EssMember.DimensionType getDimensionType()
      Description copied from interface: EssMember
      The role this dimension plays, or EssMember.DimensionType.NONE for an ordinary one and for any member below a dimension.
      Specified by:
      getDimensionType in interface EssMember
      Returns:
      the dimension's type, never null
    • getProperties

      public Map<String,Object> getProperties()
      Description copied from interface: EssMember
      Everything the server said about this member, as it said it.

      The outline viewer returns a different set of fields per member - it omits anything at its default, so a stored member with no formula and no UDAs is described in eight fields and an accounts member with a formula and a time balance in sixteen - which makes an exhaustive model of it a losing game. The typed accessors cover what is worth modelling; this is how a caller reaches consolidation, formula, twoPassCalc, uda and the rest.

      Specified by:
      getProperties in interface EssMember
      Returns:
      the member's fields, or empty for a member not read from the outline viewer
    • isDimension

      public boolean isDimension()
      Description copied from interface: EssMember
      Check if the member is a normal member or a dimension member.
      Specified by:
      isDimension in interface EssMember
      Returns:
      true if it's a dimension, false if normal member
    • isLeaf

      public boolean isLeaf()
      Description copied from interface: EssMember
      Checks if the member is a leaf node or level 0 (has no children).
      Specified by:
      isLeaf in interface EssMember
      Returns:
      true if level 0, false otherwise
    • getChildren

      public List<EssMember> getChildren()
      Description copied from interface: EssMember
      Gets the children of this member.
      Specified by:
      getChildren in interface EssMember
      Returns:
      the children of this member or an empty collection if none.
    • getChildCount

      public int getChildCount()
      Description copied from interface: EssMember
      Returns the count of children of this member.
      Specified by:
      getChildCount in interface EssMember
      Returns:
      the number of children
    • getLeafDescendants

      public List<EssMember> getLeafDescendants()
      Description copied from interface: EssMember
      Gets the level-0 descendants of this member. There is currently no REST API to do this in one call, so this method works recursively to fetch children of children and so on until the member has been explored.
      Specified by:
      getLeafDescendants in interface EssMember
      Returns:
      the level-0 descendants of this member, or a collection containing just this member if it has no children.