jet.webreport.beans
Class Parameter

java.lang.Object
  extended by jet.webreport.beans.Name
      extended by jet.webreport.beans.FieldName
          extended by jet.webreport.beans.Parameter
All Implemented Interfaces:
java.io.Serializable

public class Parameter
extends jet.webreport.beans.FieldName
implements java.io.Serializable

Parameter contains description of the parameter of a report.

See Also:
Serialized Form

Field Summary
static int MULTIPLE
           
static int ONLYSELC
           
static int REFERDBY
           
static int REQUIRED
           
 
Fields inherited from class jet.webreport.beans.FieldName
DBFIELD, FORMULA, QUALIFY, SUMMARY
 
Constructor Summary
Parameter(java.lang.String name)
          Creates a new Parameter instance by the specified name.
 
Method Summary
 java.util.List getAvailableValues()
          Returns the available values in FieldValue of the parameter for selecting.
 java.lang.String getChainID()
          Returns the chain id of the parameter.
 java.lang.String getDataType()
          Returns the data type of the parameter.
 java.lang.String getDefaultPattern(java.lang.String language, java.lang.String country)
          Returns the default format of the parameter according to the specified language and country when parameter type is date or date-time.

If the user format is not null and length more than 0, returns the user format.
If the specified language and the country are null, using the Locale.getDefault().
 java.lang.String getDispValue()
          Returns the value of the parameter for display.
 java.lang.String[] getMultiDispValue()
          Returns the display value array of the parameter if the parameter has multiple values.
 java.lang.String[] getMultiRealValue()
          Returns the value array of the parameter if the parameter has multiple values.
 java.lang.String getNextLevel()
          Returns the lower level parameter name in the cascading group.
 java.lang.String getPreviousLevel()
          Returns the higher level parameter name in the cascading group.
 java.lang.String getPrompt()
          Returns the prompt information of the parameter.
 java.lang.String getRealValue()
          Returns the value of the parameter.
 java.lang.String getUserFormat()
          Returns the user format of the parameter.
 boolean hasMultipleValue()
          Returns whether the parameter has multiple values
 boolean isAll()
          Returns whether the parameter value is set to 'ALL' which is to use all the available values.
 boolean isAllowAll()
          Returns whether this parameter is allowed All option.
 boolean isAllowTypeIn()
          Returns whether the parameter allows typing in values.
 boolean isAnonymous()
          Return whether the parameter is a anonymous parameter
 boolean isBindColumn()
          Returns whether the parameter is bind column.
 boolean isBoolean()
          Returns whether the field type is a Boolean type.
 boolean isCascading()
          Returns whether this parameter is a member of a group of cascading parameters.
 boolean isCurrency()
          Returns whether the field type is a currency type.
 boolean isDate()
          Returns whether the field type is a Date type.
 boolean isDateTime()
          Returns whether the field type is a DateTime type.
 boolean isFirst()
          Returns whether this cascading parameter is the first level.
 boolean isInteger()
          Returns whether the field type is a Integer type.
 boolean isNumber()
          Returns whether the field type is a Number type.
 boolean isOnlySelect()
          Returns whether the parameter supports selecting values from a drop-down list.
 boolean isReferedBy()
          Returns whether the parameter is referred by others.
 boolean isRequired()
          Returns whether the parameter is required.
 boolean isString()
          Returns whether this field type is a String type.
 boolean isTime()
          Returns whether the field type is a Time type.
 void setAllowAll(boolean isAllowAll)
          Sets whether this parameter is allowed All option.
 void setAllowTypeIn(boolean isAllowed)
          Sets whether the parameter allows typing in values.
 void setAllSelected(boolean isAll)
          Sets whether the parameter value is set to 'ALL' which is to use all the available values.
 void setAvailableValues(java.util.ArrayList values)
          Sets the available values in FieldValue.
 void setBindColumn(boolean isBind)
          Sets whether the parameter is bind column.
 void setCascadingInfo(java.lang.String chainID, java.lang.String previousLevel, java.lang.String nextLevel)
           
 void setDataType(java.lang.String type)
          Sets the data type of the parameter.
 void setDispValues(java.lang.String[] dvalues)
          Sets the display value array of the parameter.
 void setFirst(boolean isFirst)
          Sets whether this cascading parameter is the first level.
 void setIsAnonymous(boolean isAnonymous)
           
 void setMask(int mask)
          Sets the parameter type.
 void setPrompt(java.lang.String prompt)
          Sets the prompt information of the parameter.
 void setRealValues(java.lang.String[] values)
          Sets the value array of the parameter.
 void setUserFormat(java.lang.String userFormat)
          Sets the user format of the parameter.
 
Methods inherited from class jet.webreport.beans.FieldName
getFieldType, getFormatPattern, getPrecision, getScale, getSqlType, isDbField, isFormula, isSummary, setFieldType, setFormatPattern, setPrecision, setScale, setSqlType
 
Methods inherited from class jet.webreport.beans.Name
compareTo, equals, getDispName, getName, getType, hashCode, setDispName, setName, setType, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REQUIRED

public static final transient int REQUIRED
See Also:
Constant Field Values

ONLYSELC

public static final transient int ONLYSELC
See Also:
Constant Field Values

REFERDBY

public static final transient int REFERDBY
See Also:
Constant Field Values

MULTIPLE

public static final transient int MULTIPLE
See Also:
Constant Field Values
Constructor Detail

Parameter

public Parameter(java.lang.String name)
Creates a new Parameter instance by the specified name.

Parameters:
name - A parameter name string.
Method Detail

getDataType

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

Returns:
the data type of the parameter.

setDataType

public void setDataType(java.lang.String type)
Sets the data type of the parameter.

Parameters:
type - the data type of the parameter.

getRealValue

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

Returns:
the value of the parameter.

getMultiRealValue

public java.lang.String[] getMultiRealValue()
Returns the value array of the parameter if the parameter has multiple values.

Returns:
the value array.

setRealValues

public void setRealValues(java.lang.String[] values)
Sets the value array of the parameter.

Parameters:
values - the value array of the parameter.

getDispValue

public java.lang.String getDispValue()
Returns the value of the parameter for display.

Returns:
the value of the parameter for display.

getMultiDispValue

public java.lang.String[] getMultiDispValue()
Returns the display value array of the parameter if the parameter has multiple values.

Returns:
the display value array of the parameter.

setDispValues

public void setDispValues(java.lang.String[] dvalues)
Sets the display value array of the parameter.

Parameters:
dvalues - the display value array of the parameter.

getAvailableValues

public java.util.List getAvailableValues()
Returns the available values in FieldValue of the parameter for selecting.

Returns:
java.util.List
See Also:
FieldValue

setAvailableValues

public void setAvailableValues(java.util.ArrayList values)
Sets the available values in FieldValue.

Parameters:
values - the available values.
See Also:
FieldValue

getPrompt

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

Returns:
the prompt information of the parameter.

setPrompt

public void setPrompt(java.lang.String prompt)
Sets the prompt information of the parameter.

Parameters:
prompt - the prompt information of the parameter.

setMask

public void setMask(int mask)
Sets the parameter type.

Parameters:
mask - the parameter type:
REQUIRED
ONLYSELC
REFERDBY
MULTIPLE

isRequired

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

Returns:
true the parameter is required; otherwise false.

isOnlySelect

public boolean isOnlySelect()
Returns whether the parameter supports selecting values from a drop-down list.

Returns:
true the parameter supports value selection; otherwise false.

isReferedBy

public boolean isReferedBy()
Returns whether the parameter is referred by others.

Returns:
true the parameter is referred by; otherwise false.

hasMultipleValue

public boolean hasMultipleValue()
Returns whether the parameter has multiple values

Returns:
true the parameter has multiple values; otherwise false.

isInteger

public boolean isInteger()
Returns whether the field type is a Integer type.

Overrides:
isInteger in class jet.webreport.beans.FieldName
Returns:
true the field type is Integer; otherwise false.

isNumber

public boolean isNumber()
Returns whether the field type is a Number type.

Overrides:
isNumber in class jet.webreport.beans.FieldName
Returns:
true the field type is Number; otherwise false.

isCurrency

public boolean isCurrency()
Returns whether the field type is a currency type.

Returns:
true the field type is Currency; otherwise false.

isString

public boolean isString()
Returns whether this field type is a String type.

Overrides:
isString in class jet.webreport.beans.FieldName
Returns:
true the field type is String; otherwise false.

isBoolean

public boolean isBoolean()
Returns whether the field type is a Boolean type.

Overrides:
isBoolean in class jet.webreport.beans.FieldName
Returns:
true the field type is Boolean; otherwise false.

isDate

public boolean isDate()
Returns whether the field type is a Date type.

Overrides:
isDate in class jet.webreport.beans.FieldName
Returns:
true the field type is Date; otherwise false.

isTime

public boolean isTime()
Returns whether the field type is a Time type.

Overrides:
isTime in class jet.webreport.beans.FieldName
Returns:
true the field type is Time; otherwise false.

isDateTime

public boolean isDateTime()
Returns whether the field type is a DateTime type.

Overrides:
isDateTime in class jet.webreport.beans.FieldName
Returns:
true the field type is DateTime; otherwise false.

isAllowTypeIn

public boolean isAllowTypeIn()
Returns whether the parameter allows typing in values.

Returns:
true the parameter allows typing in values; otherwise false.

setAllowTypeIn

public void setAllowTypeIn(boolean isAllowed)
Sets whether the parameter allows typing in values.

Parameters:
isAllowed - whether the parameter allows typing in values.

isAll

public boolean isAll()
Returns whether the parameter value is set to 'ALL' which is to use all the available values.

Returns:
true the parameter value is 'ALL'; otherwise false.

setAllSelected

public void setAllSelected(boolean isAll)
Sets whether the parameter value is set to 'ALL' which is to use all the available values.

Parameters:
isAll - whether the parameter value is set to 'ALL'.

isAllowAll

public boolean isAllowAll()
Returns whether this parameter is allowed All option.

Returns:
true the parameter is allowed All option; otherwise false.

setAllowAll

public void setAllowAll(boolean isAllowAll)
Sets whether this parameter is allowed All option.

Parameters:
isAllowAll - whether this parameter is allowed All option.

isCascading

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

Returns:
true the parameter is a member of a group of cascading parameters; otherwise false.

getChainID

public java.lang.String getChainID()
Returns the chain id of the parameter.

Returns:
the chain id.

getPreviousLevel

public java.lang.String getPreviousLevel()
Returns the higher level parameter name in the cascading group.

Returns:
the higher level parameter name in the cascading group. Null for first level.

getNextLevel

public java.lang.String getNextLevel()
Returns the lower level parameter name in the cascading group.

Returns:
the lower level parameter name in the cascading group. Null for last level.

setCascadingInfo

public void setCascadingInfo(java.lang.String chainID,
                             java.lang.String previousLevel,
                             java.lang.String nextLevel)

setFirst

public void setFirst(boolean isFirst)
Sets whether this cascading parameter is the first level.

Parameters:
isFirst - whether this cascading parameter is the first level.

isFirst

public boolean isFirst()
Returns whether this cascading parameter is the first level.

Returns:
true the parameter is the first level when it is cascading; otherwise false.

isBindColumn

public boolean isBindColumn()
Returns whether the parameter is bind column.

Returns:
true the parameter is bind column; otherwise false.

setBindColumn

public void setBindColumn(boolean isBind)
Sets whether the parameter is bind column.

Parameters:
isBind - whether the parameter is bind column.

getUserFormat

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

Returns:
the user format of the parameter.

setUserFormat

public void setUserFormat(java.lang.String userFormat)
Sets the user format of the parameter.

Parameters:
userFormat - the user format of the parameter.

getDefaultPattern

public java.lang.String getDefaultPattern(java.lang.String language,
                                          java.lang.String country)
Returns the default format of the parameter according to the specified language and country when parameter type is date or date-time.

If the user format is not null and length more than 0, returns the user format.
If the specified language and the country are null, using the Locale.getDefault().

Parameters:
language - the language.
country - the country.
Returns:
the default format of the parameter.

isAnonymous

public final boolean isAnonymous()
Return whether the parameter is a anonymous parameter

Returns:

setIsAnonymous

public final void setIsAnonymous(boolean isAnonymous)