Interface EssVariable
- All Superinterfaces:
EssObject
- All Known Subinterfaces:
EssApplicationVariable,EssCubeVariable,EssServerVariable
- All Known Implementing Classes:
EssApplicationVariableImpl,EssCubeVariableImpl,EssServerVariableImpl,EssVariableImpl
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".
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumWhich 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 TypeMethodDescriptionvoiddelete()Deletes this variable, at its own scope.getName()Gets the name of this object.getScope()Where this variable is defined - which is also what it takes precedence over.getType()Gets the type of this object.getValue()voidChanges 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:EssObjectGets 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. -
getType
EssObject.Type getType()Description copied from interface:EssObjectGets the type of this object. -
getValue
String getValue()- Returns:
- the value this variable currently holds
-
setValue
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.
-