mondrian.olap
Class ParameterImpl

java.lang.Object
  extended by mondrian.olap.ParameterImpl
All Implemented Interfaces:
ParameterCompilable, Parameter

public class ParameterImpl
extends java.lang.Object
implements Parameter, ParameterCompilable

Implementation of Parameter.

Since:
Jul 22, 2006
Version:
$Id: //open/mondrian/src/main/mondrian/olap/ParameterImpl.java#13 $
Author:
jhyde

Nested Class Summary
 
Nested classes/interfaces inherited from interface mondrian.olap.Parameter
Parameter.Scope
 
Constructor Summary
ParameterImpl(java.lang.String name, Exp defaultExp, java.lang.String description, Type type)
           
 
Method Summary
 Calc compile(ExpCompiler compiler)
           
 boolean equals(java.lang.Object other)
          Returns whether this parameter is equal to another, based upon name, type and value
 java.lang.Object[] getChildren()
           
 Exp getDefaultExp()
          Returns the expression which provides the default value for this Parameter.
 java.lang.String getDescription()
          Returns the description of this Parameter.
 java.lang.String getName()
          Returns the name of this Parameter.
 Parameter.Scope getScope()
          Returns the scope where this parmater is defined.
 Type getType()
          Returns the type of this Parameter.
 java.lang.Object getValue()
          Returns the value of this parameter.
 int hashCode()
           
 boolean isModifiable()
          Returns whether the parameter can be modified.
 void setDefaultExp(Exp defaultExp)
           
 void setDescription(java.lang.String description)
           
 void setType(Type type)
           
 void setValue(java.lang.Object value)
          Sets the value of this parameter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterImpl

public ParameterImpl(java.lang.String name,
                     Exp defaultExp,
                     java.lang.String description,
                     Type type)
Method Detail

getScope

public Parameter.Scope getScope()
Description copied from interface: Parameter
Returns the scope where this parmater is defined.

Specified by:
getScope in interface Parameter

getType

public Type getType()
Description copied from interface: Parameter
Returns the type of this Parameter.

Specified by:
getType in interface Parameter

getDefaultExp

public Exp getDefaultExp()
Description copied from interface: Parameter
Returns the expression which provides the default value for this Parameter. Never null.

Specified by:
getDefaultExp in interface Parameter

getName

public java.lang.String getName()
Description copied from interface: Parameter
Returns the name of this Parameter.

Specified by:
getName in interface Parameter

getValue

public java.lang.Object getValue()
Description copied from interface: Parameter
Returns the value of this parameter. If Parameter.setValue(Object) has not been called, and the parameter still has its default value, returns null.

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

Specified by:
getValue in interface Parameter

setValue

public void setValue(java.lang.Object value)
Description copied from interface: Parameter
Sets the value of this parameter.

Specified by:
setValue in interface Parameter
Parameters:
value - Value of the parameter; must be a String, a Double, or a Member

getDescription

public java.lang.String getDescription()
Description copied from interface: Parameter
Returns the description of this Parameter.

Specified by:
getDescription in interface Parameter

getChildren

public java.lang.Object[] getChildren()

equals

public boolean equals(java.lang.Object other)
Returns whether this parameter is equal to another, based upon name, type and value

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isModifiable

public boolean isModifiable()
Returns whether the parameter can be modified.

Specified by:
isModifiable in interface Parameter

setDescription

public void setDescription(java.lang.String description)

setType

public void setType(Type type)

setDefaultExp

public void setDefaultExp(Exp defaultExp)

compile

public Calc compile(ExpCompiler compiler)
Specified by:
compile in interface ParameterCompilable

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads