Interface EssVariable

All Superinterfaces:
EssObject
All Known Subinterfaces:
EssApplicationVariable, EssCubeVariable, EssServerVariable
All Known Implementing Classes:
EssApplicationVariableImpl, EssCubeVariableImpl, EssServerVariableImpl, EssVariableImpl

public interface EssVariable extends EssObject
A substitution variable, at whichever of the three scopes it is defined.

Essbase keeps variables at three levels - server, application, cube - and at evaluation time they cascade: a calculation or query running against a cube sees its own variables, its application's, and the server's, with the nearest definition winning. A cube variable shadows an application one of the same name, which shadows a server one.

The REST API does not reflect that. Each list endpoint returns only what is defined at exactly that level: a server variable does not appear in an application's list, and asking for one by name at the wrong level is an error rather than an inherited hit. So the cascade has to be worked out here - see EssCube.getEffectiveVariables(), which is the only place in this library that answers "what would this cube actually see".

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Which level a variable is defined at, in cascade order - each shadows the ones before it.

    Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject

    EssObject.Type
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes this variable, at its own scope.
    Gets the name of this object.
    Where this variable is defined - which is also what it takes precedence over.
    Gets the type of this object.
     
    void
    Changes this variable's value on the server, in place.
  • Method Details

    • getScope

      EssVariable.Scope getScope()
      Where this variable is defined - which is also what it takes precedence over.
      Returns:
      the scope, never null
    • getName

      String getName()
      Description copied from interface: EssObject
      Gets the name of this object. This will generally be the "nice" and "unique" name of this object, such as the application name, cube, member, variable, or whatever.
      Specified by:
      getName in interface EssObject
      Returns:
      the simple name of this object
    • getType

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

      String getValue()
      Returns:
      the value this variable currently holds
    • setValue

      void setValue(String value)
      Changes this variable's value on the server, in place.

      Separate from creating one: the server refuses to create a variable that already exists at that level ("Variable 'x' already exists in server") and refuses to edit one that doesn't, so the two are not interchangeable.

      Parameters:
      value - the new value
    • delete

      void delete()
      Deletes this variable, at its own scope.

      Only the definition at this variable's own level: deleting a cube variable that shadows an application one uncovers the application one rather than removing both.