jet.cs
Class Param

java.lang.Object
  extended by jet.cs.Param

public class Param
extends java.lang.Object

Class Param defines a parameter description of a report.


Method Summary
static java.util.Vector changedHashToVector(java.util.Hashtable hash)
          Changes Hashtable to Vector.
static java.util.Hashtable changedVectorToHash(java.util.Vector v)
          Changes Vector to Hash table.
 int getBeColumn()
          Returns if the parameter only accepts a column name as its value.
 java.lang.String getBinding()
          Returns the parameter bound value.
 int getDefaultIndex()
          Returns the parameter default index.
 java.lang.String getDefaultValue()
          Returns the default value of the parameter.
 java.lang.String getFormat()
          Returns the format of the parameter.
 java.util.Vector getLimit()
          Returns the limit of the parameter value range.
 java.lang.String[] getMultiStrValue()
          Returns parameter multiple values.
 java.lang.String getName()
          Returns the name of the parameter.
 java.lang.String getNextLevel()
          For cascading parameter, returns the lower level parameter name.
 int getOperation()
          Returns the operation of the parameter.
 java.lang.String getPreviousLevel()
          For a cascading parameter, returns the higher level parameter name.
 java.lang.String getPrompt()
          Returns the prompt message of the parameter.
 java.util.Vector getReferedBy()
          Returns if the parameter is referred by other parameters.
 int getType()
          Returns the type of the parameter.
static int getType(java.lang.String sType)
          Returns the int value of a data type string.
 java.lang.String getTypeName()
          Returns the name of the data type of the parameter.
 java.lang.String getValue()
          Returns the value of the parameter.
 java.util.Vector getValueOptions()
          Returns the value option for the parameter.
 java.util.Vector getValues()
          Returns the value of the parameter.
 int getWhenOutOfRange()
          Returns the processing way when a type-in value is out of range.
 boolean isAllowAll()
          Returns whether the parameter allows for multiple values to be selected.
 boolean isAllowTypeIn()
          Returns whether the parameter allows for type-in values directly.
If it is true, UI should allow users to type in values directly, regardless of whether the parameter is bound with the column.
 boolean isAllSelected()
          Returns whether the parameter allows the ALL value to represent all the values of the parameter.
 boolean isCascading()
          Returns whether the parameter is a member of a group of cascading parameters.
 boolean isColumn()
          Returns if the parameter only accepts a column name.
 boolean isDistinct()
          Returns if the parameter is distinct.
 boolean isMultipleValue()
          Returns whether the parameter allows for multiple values to be selected.
 boolean isReferedBy()
          Returns if the parameter is referred by other parameters.
 boolean isRequired()
          Returns if the parameter is required.
 boolean isSetAsParameter()
           
static Param parseFromParamDescToParam(ParamDesc desc, java.util.Locale locale)
          Parses ParamDesc into the Param object.
static java.util.Vector[] parseParamDescStream(java.io.BufferedReader inStream, java.util.Hashtable oldParams)
          Parses the buffer stream into the Param with the defined parameter properties.
 void setValue(java.lang.String value)
          Sets the value of the parameter.
static ParamDesc toParamDesc(Param param, java.util.Locale loc)
          Gets ParamDesc object with Param object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypeName

public java.lang.String getTypeName()
Returns the name of the data type of the parameter.

Returns:
the name of the data type of the parameter.

getName

public java.lang.String getName()
Returns the name of the parameter.

Returns:
the name of the parameter.

getValue

public java.lang.String getValue()
Returns the value of the parameter.

Returns:
the value of the parameter.

getPrompt

public java.lang.String getPrompt()
Returns the prompt message of the parameter.

Returns:
the prompt message of the parameter.

getDefaultValue

public java.lang.String getDefaultValue()
Returns the default value of the parameter.

Returns:
the default value of the parameter.

getType

public int getType()
Returns the type of the parameter.

Returns:
the type of the parameter.

getValueOptions

public java.util.Vector getValueOptions()
Returns the value option for the parameter.

Returns:
the value option for the parameter.

isColumn

public boolean isColumn()
Returns if the parameter only accepts a column name.

Returns:
true if the parameter only accepts a column name, false otherwise.

setValue

public void setValue(java.lang.String value)
Sets the value of the parameter.

Parameters:
Value - of the parameter.

getType

public static int getType(java.lang.String sType)
Returns the int value of a data type string.

Returns:
the int value of a data type string.

isMultipleValue

public boolean isMultipleValue()
Returns whether the parameter allows for multiple values to be selected.

Returns:
true if the parameter allows for multiple values to be selected, else returns false.

isAllowAll

public boolean isAllowAll()
Returns whether the parameter allows for multiple values to be selected.

Returns:
true if the parameter allows for multiple values to be selected, else returns false.

isCascading

public boolean isCascading()
Returns whether the parameter is a member of a group of cascading parameters.

Returns:
true if the parameter is a member of a group of cascading parameters, else returns false.

getPreviousLevel

public java.lang.String getPreviousLevel()
For a cascading parameter, returns the higher level parameter name. If the parameter is a non-cascading parameter or it is the highest level of the cascading group, returns null.

Returns:
the parent level parameter name.

getNextLevel

public java.lang.String getNextLevel()
For cascading parameter, returns the lower level parameter name. If the parameter is a non-cascading parameter or it is the lowest level of the cascading group, returns null.

Returns:
the lower level parameter name.

isSetAsParameter

public boolean isSetAsParameter()

isAllowTypeIn

public boolean isAllowTypeIn()
Returns whether the parameter allows for type-in values directly.
If it is true, UI should allow users to type in values directly, regardless of whether the parameter is bound with the column.

Returns:
true if the parameter allows type-in values, else returns false.

getWhenOutOfRange

public int getWhenOutOfRange()
Returns the processing way when a type-in value is out of range.

Returns:
ParamDesc.ADOPT_DIRECTLY, ParamDesc.USE_DEFAULT, or ParamDesc.WARN.
See Also:
ParamDesc

getMultiStrValue

public java.lang.String[] getMultiStrValue()
Returns parameter multiple values.

Returns:
parameter multiple values.

isAllSelected

public boolean isAllSelected()
Returns whether the parameter allows the ALL value to represent all the values of the parameter.

Returns:
true if the parameter allows the ALL value, else returns false.

parseParamDescStream

public static java.util.Vector[] parseParamDescStream(java.io.BufferedReader inStream,
                                                      java.util.Hashtable oldParams)
                                               throws java.io.IOException
Parses the buffer stream into the Param with the defined parameter properties.

Parameters:
inStream - The parameter input stream.
oldParams - The hastable contains the parameter name and value. If the oldParams is not null and the parameter name exists at the stream, the parsed parameter value will be affected by oldParams.
Returns:
Vector array. Vector[0] contains Param object. Vector[1] contains ColumnNames. Vector[2] contains Parameter Index.
Throws:
java.io.IOException

getLimit

public java.util.Vector getLimit()
Returns the limit of the parameter value range.

Returns:
the limit of the parameter value range.

getValues

public java.util.Vector getValues()
Returns the value of the parameter.

Returns:
the value of the parameter.

getFormat

public java.lang.String getFormat()
Returns the format of the parameter.

Returns:
the format of the parameter.

getOperation

public int getOperation()
Returns the operation of the parameter.

Returns:
the operation of the parameter.

getDefaultIndex

public int getDefaultIndex()
Returns the parameter default index.

Returns:
the parameter default index.

getBinding

public java.lang.String getBinding()
Returns the parameter bound value.

Returns:
the parameter bound value.

getBeColumn

public int getBeColumn()
Returns if the parameter only accepts a column name as its value.

Returns:
true if the parameter only accepts a column name as its value, else returns false.

isDistinct

public boolean isDistinct()
Returns if the parameter is distinct.

Returns:
true if the parameter is distinct, else returns false.

isRequired

public boolean isRequired()
Returns if the parameter is required.

Returns:
true if the parameter is required, else returns false.

isReferedBy

public boolean isReferedBy()
Returns if the parameter is referred by other parameters.

Returns:
true if the parameter is referred by other parameters, else returns false.

getReferedBy

public java.util.Vector getReferedBy()
Returns if the parameter is referred by other parameters.

Returns:
Vector if the parameter is referred by other parameters, and the element is the parameter name.

toParamDesc

public static ParamDesc toParamDesc(Param param,
                                    java.util.Locale loc)
Gets ParamDesc object with Param object.

Parameters:
param - The Param object.
loc - The locale of parameter.
Returns:
ParamDesc.
See Also:
ParamDesc, Param

parseFromParamDescToParam

public static Param parseFromParamDescToParam(ParamDesc desc,
                                              java.util.Locale locale)
Parses ParamDesc into the Param object.

Parameters:
desc - The ParamDesc object.
locale - The local of the parameter.
Returns:
Param object.
See Also:
ParamDesc, Param

changedVectorToHash

public static java.util.Hashtable changedVectorToHash(java.util.Vector v)
Changes Vector to Hash table.
Element is ParamDesc.

Parameters:
v -
Returns:
Hashtable: the key is ParamDesc.name; the value is ParamDesc.

changedHashToVector

public static java.util.Vector changedHashToVector(java.util.Hashtable hash)
Changes Hashtable to Vector.

Parameters:
hash - The key is ParamDesc.name; the value is ParamDesc.
Returns:
Vector: element is ParamDesc.