Package mondrian.olap

Interface Parameter

All Known Subinterfaces:
ParameterCompilable
All Known Implementing Classes:
ParameterImpl, RolapSchemaParameter

public interface Parameter
Parameter to a Query.

A parameter is not an expression; see ParameterExpr.

Since:
Jul 22, 2006
Author:
jhyde
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Scope where a parameter is defined.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the expression which provides the default value for this Parameter.
    Returns the description of this Parameter.
    Returns the name of this Parameter.
    Returns the scope where this parameter is defined.
    Returns the type of this Parameter.
    Returns the value of this parameter.
    boolean
    Returns whether the value of this Parameter can be modified in a query.
    boolean
    Returns whether the value of this parameter has been set.
    void
    Sets the value of this parameter.
    void
    Unsets the value of this parameter.
  • Method Details

    • getScope

      Parameter.Scope getScope()
      Returns the scope where this parameter is defined.
      Returns:
      Scope of the parameter
    • getType

      Type getType()
      Returns the type of this Parameter.
      Returns:
      Type of the parameter
    • getDefaultExp

      Exp getDefaultExp()
      Returns the expression which provides the default value for this Parameter. Never null.
      Returns:
      Default value expression of the parameter
    • getName

      String getName()
      Returns the name of this Parameter.
      Returns:
      Name of the parameter
    • getDescription

      String getDescription()
      Returns the description of this Parameter.
      Returns:
      Description of the parameter
    • isModifiable

      boolean isModifiable()
      Returns whether the value of this Parameter can be modified in a query.
      Returns:
      Whether parameter is modifiable
    • getValue

      Object getValue()
      Returns the value of this parameter.

      If setValue(Object) has not been called, returns the default value of this parameter.

      The type of the value is (depending on the type of the parameter) a String, Number, or Member.

      Returns:
      The value of this parameter
    • setValue

      void setValue(Object value)
      Sets the value of this parameter.
      Parameters:
      value - Value of the parameter; must be a String, a Double, or a Member
    • isSet

      boolean isSet()
      Returns whether the value of this parameter has been set.

      If the value has not been set, this parameter will return its default value.

      Setting a parameter to null is not equivalent to unsetting it. To unset a parameter, call unsetValue().

      Returns:
      Whether this parameter has been assigned a value
    • unsetValue

      void unsetValue()
      Unsets the value of this parameter.

      After calling this method, the parameter will revert to its default value, as if setValue(Object) had not been called, and isSet() will return false.