public class

FormalParameterImpl

extends Object
implements FormalParameter
java.lang.Object
   ↳ com.microstrategy.web.transform.FormalParameterImpl

Class Overview

FormalParameterImpl implements the FormalParameter interface and defines the structure of a single formal parameter.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.transform.FormalParameter
Fields
protected String name
Public Constructors
FormalParameterImpl(String name, int type)
Constructor of FormalparameterImpl class.
FormalParameterImpl(String name, int type, FormalParameterAnnotation annotation)
Public Methods
void checkValue(Object value)
Verifies that the value correspons to the type of the FormalParameter object.
FormalParameterAnnotation getAnnotation()
Object getDefaultValue()
Returns the default value of the FormalParameter object.
String getDescription()
Returns the textual description of the FormalParameter object
String getName()
Returns the name of the FormalParameter object.
String getStringKey()
int getType()
Returns the data type of the FormalParameter object.
Object getValue()
Returns the actual value of the FormalParameter object.
Object getValue(boolean returnDefault)
Returns the actual value of the FormalParameter object.
boolean isRequired()
Returns whether the FormalParameter object is required by the transform.
String paramTypeToString(int paramType)
Returns the type of the FormalParamber object as string.
void setAnnotation(FormalParameterAnnotation annotation)
void setDefaultValue(Object defaultValue)
Sets the default value of the FormalParameter object.
void setDescription(String description)
Sets the description of the FormalParameter object.
void setRequired(boolean required)
Sets the FormalParameter object as required.
void setValue(Object value)
Sets the actual value of the FormalParameter object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.transform.FormalParameter

Fields

protected String name

Public Constructors

public FormalParameterImpl (String name, int type)

Constructor of FormalparameterImpl class.

Parameters
name the name of the FormalParameter object.
type the type of the FormalParameter object.

public FormalParameterImpl (String name, int type, FormalParameterAnnotation annotation)

Public Methods

public void checkValue (Object value)

Verifies that the value correspons to the type of the FormalParameter object.

Parameters
value the value wanted to be checked.
Throws
IllegalArgumentException thrown if the default value is null or does not correspond to the data type of the FormalParameter object.

public FormalParameterAnnotation getAnnotation ()

public Object getDefaultValue ()

Returns the default value of the FormalParameter object.

Returns
  • default value of FormalParameter object.

public String getDescription ()

Returns the textual description of the FormalParameter object

Returns
  • description of the FormalParameter object

public String getName ()

Returns the name of the FormalParameter object.

Returns
  • name of the FormalParameter object.

public String getStringKey ()

public int getType ()

Returns the data type of the FormalParameter object.

Returns
  • data type of FormalParameter object.

public Object getValue ()

Returns the actual value of the FormalParameter object. If the actual value is null, then it will return the default value.

Returns
  • actual value of FormalParameter object.

public Object getValue (boolean returnDefault)

Returns the actual value of the FormalParameter object. If it is null and the parameter is set to True, then it will return the default value.

Parameters
returnDefault specifies whether it will return the default value in case the actual value is null.
Returns
  • the actual value or default value of FormalParameter object.

public boolean isRequired ()

Returns whether the FormalParameter object is required by the transform.

Returns
  • whether the FormalParamber object is required or not.

public String paramTypeToString (int paramType)

Returns the type of the FormalParamber object as string.

Parameters
paramType the type of the FormalParameter object.
Returns
  • string that specifies the type of the FormalParameter object.

public void setAnnotation (FormalParameterAnnotation annotation)

public void setDefaultValue (Object defaultValue)

Sets the default value of the FormalParameter object.

Parameters
defaultValue the default value of the FormalParameter object.
Throws
IllegalArgumentException thrown if the default value is null or does not correspond to the data type of the FormalParameter object.

public void setDescription (String description)

Sets the description of the FormalParameter object.

Parameters
description the description of the FromalParameter object.

public void setRequired (boolean required)

Sets the FormalParameter object as required.

Parameters
required whether you want to set the FormalParameter as required or not.

public void setValue (Object value)

Sets the actual value of the FormalParameter object.

Parameters
value the actual value of the FormalParameter ojbect.
Throws
IllegalArgumentException thrown if the actual value is null or does not correspond to the data type of the FormalParameter object.