public class Parameter
extends FieldName
implements java.io.Serializable
Parameter
contains description of the parameter of a report.Modifier and Type | Field and Description |
---|---|
static int |
MULTIPLE |
static int |
ONLYSELC |
static int |
REFERDBY |
static int |
REQUIRED |
Constructor and Description |
---|
Parameter(java.lang.String name)
Creates a new
Parameter instance by the specified name. |
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getShowValueSqlType() |
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 |
isSameValShowColum() |
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 |
setSameValShowColum(boolean isSameValShowColum) |
void |
setShowValueSqlType(int t) |
void |
setUserFormat(java.lang.String userFormat)
Sets the user format of the parameter.
|
public static final transient int REQUIRED
public static final transient int ONLYSELC
public static final transient int REFERDBY
public static final transient int MULTIPLE
public Parameter(java.lang.String name)
Parameter
instance by the specified name.name
- A parameter name string.public java.lang.String getDataType()
public void setDataType(java.lang.String type)
type
- the data type of the parameter.public java.lang.String getRealValue()
public java.lang.String[] getMultiRealValue()
public void setRealValues(java.lang.String[] values)
values
- the value array of the parameter.public java.lang.String getDispValue()
public java.lang.String[] getMultiDispValue()
public void setDispValues(java.lang.String[] dvalues)
dvalues
- the display value array of the parameter.public java.util.List getAvailableValues()
FieldValue
of the parameter for selecting.java.util.List
jet.webreport.beans.FieldValue
public void setAvailableValues(java.util.ArrayList values)
FieldValue
.values
- the available values.jet.webreport.beans.FieldValue
public java.lang.String getPrompt()
public void setPrompt(java.lang.String prompt)
prompt
- the prompt information of the parameter.public void setMask(int mask)
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.
- Returns:
- true the field type is Integer; otherwise false.
-
isNumber
public boolean isNumber()
Returns whether the field type is a Number
type.
- 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.
- Returns:
- true the field type is String; otherwise false.
-
isBoolean
public boolean isBoolean()
Returns whether the field type is a Boolean
type.
- Returns:
- true the field type is Boolean; otherwise false.
-
isDate
public boolean isDate()
Returns whether the field type is a Date
type.
- Returns:
- true the field type is Date; otherwise false.
-
isTime
public boolean isTime()
Returns whether the field type is a Time
type.
- Returns:
- true the field type is Time; otherwise false.
-
isDateTime
public boolean isDateTime()
Returns whether the field type is a DateTime
type.
- 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)
-
isSameValShowColum
public final boolean isSameValShowColum()
-
setSameValShowColum
public final void setSameValShowColum(boolean isSameValShowColum)
-
getShowValueSqlType
public int getShowValueSqlType()
-
setShowValueSqlType
public void setShowValueSqlType(int t)