Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.api
Class ParameterInfo

    java.lang.Object
      jet.api.ParameterInfo

    public class ParameterInfo

extends java.lang.Object

The class defines a JReport Parameter object. A parameter is a variable whose value is input at runtime. If a report contains a parameter, you will need to specify a value for the parameter when running the report. Parameters defined in a catalog can be used in different reports.

Field Summary
`static int` | `BETWEEN` operator type
`static int` | `MAX` index of limit value
`static int` | `MIN` index of limit value
`static int` | `UNKNOWN` operator type

Constructor Summary
`ParameterInfo()` Constructor.
`ParameterInfo(java.lang.String name, java.lang.String value, java.lang.String[] values, java.lang.String prompt)` Constructor.
`ParameterInfo(java.lang.String name, java.lang.String value, java.lang.String[] values, java.lang.String[] bindValues, java.lang.String prompt)` Constructor.
`ParameterInfo(java.lang.String name, java.lang.String desc, java.lang.String prompt, java.lang.String type)` Constructor.
`ParameterInfo(java.lang.String name, java.lang.String desc, java.lang.String type, java.lang.String prompt, java.lang.String format, int operator, int index)` Constructor.

Method Summary
`void` | `clearDefaultValue()` Clears the parameter default values.
`boolean` | `deleteDefaultValue(int index)` Deletes the parameter default value.
`boolean` | `deleteDefaultValue(java.lang.String value)` Deletes the parameter default value from the value list.
`boolean` | `deleteLimit(int index)` Deletes the parameter limit value.
`boolean` | `deleteLimit(java.lang.String value)` Deletes the parameter limied value.
`java.lang.String[]` | `getBindValues()` Gets the parameter bound values.
`java.lang.String[]` | `getDefaultValues()` Gets the parameter default values.
`java.lang.String` | `getDescription()` Gets the parameter description.
`java.lang.String` | `getFormat()` Gets the parameter user defined format.
`int` | `getIndex()` Gets the default value index of the parameter's value list.
`boolean` | `getIsBindColumn()` Checks whether the parameter is bound to a column.
`java.lang.String[]` | `getLimit()` Gets the parameter limit values.
`java.lang.String` | `getLimit(int index)` Gets the parameter limit value.
`java.lang.String` | `getName()` Gets the parameter name.
`int` | `getOperator()` Gets the parameter limit operator.
`java.lang.String` | `getPrompt()` Gets the parameter prompt text.
`java.lang.String` | `getType()` Gets the parameter data type.
`java.lang.String` | `getValue()` Gets the String format value of the parameter.
`int` | `getValueLength()` Gets the number of the parameter default values.
`void` | `setBindValues(java.lang.String[] bindValues)` Sets the parameter bound values.
`void` | `setDefaultValue(java.lang.String value)` Sets the parameter default value.
`void` | `setDescription(java.lang.String desc)` Sets the parameter description.
`void` | `setFormat(java.lang.String format)` Sets the parameter's format.
`void` | `setIndex(int index)` Sets the default value index of the parameter's value list.
`void` | `setIsBindColumn(boolean isBindColumn)` Sets the parameter if it is bound to a column.
`void` | `setLimit(java.lang.String value, int index)` Sets the parameter limit value.
`void` | `setName(java.lang.String name)` Sets the parameter name.
`void` | `setOperator(int operator)` Sets the parameter limit operator.
`void` | `setPrompt(java.lang.String prompt)` Sets the parameter prompt.
`void` | `setType(java.lang.String type)` Sets the parameter data type.
`void` | `setValue(java.lang.String value)` Sets the parameter value.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MIN

    public static final int MIN

  index of limit value

  See Also:
    Constant Field Values

### MAX

    public static final int MAX

  index of limit value

  See Also:
    Constant Field Values

### UNKNOWN

    public static final int UNKNOWN

  operator type

  See Also:
    Constant Field Values

### BETWEEN

    public static final int BETWEEN

  operator type

  See Also:
    Constant Field Values

Constructor Detail

### ParameterInfo

    public ParameterInfo()

  Constructor. Creates a blank parameter information object.

### ParameterInfo

    public ParameterInfo(java.lang.String name,
                         java.lang.String desc,
                         java.lang.String prompt,
                         java.lang.String type)

  Constructor. Creates a parameter information object.

  Parameters:
    `name` - The parameter name.
    `desc` - The parameter description.
    `prompt` - The parameter prompt text.
    `type` - The string value of the parameter data type. Useful constants for the type:
    - `CatalogAPI.INTEGER`
    - `CatalogAPI.NUMBER`
    - `CatalogAPI.STRING`
    - `CatalogAPI.CURRENCY`
    - `CatalogAPI.BOOLEAN`
    - `CatalogAPI.DATE`
    - `CatalogAPI.TIME`
    - `CatalogAPI.DATETIME`
    - `CatalogAPI.PARAMETERS`

### ParameterInfo

    public ParameterInfo(java.lang.String name,
                         java.lang.String value,
                         java.lang.String[] values,
                         java.lang.String prompt)

  Constructor. Creates a parameter information object.

  Parameters:
    `name` - The parameter name.
    `value` - The parameter value.
    `prompt` - The parameter prompt text.
    `values` - The parameter default values.

### ParameterInfo

    public ParameterInfo(java.lang.String name,
                         java.lang.String value,
                         java.lang.String[] values,
                         java.lang.String[] bindValues,
                         java.lang.String prompt)

  Constructor. Creates a parameter information object.

  Parameters:
    `name` - The parameter name.
    `value` - The parameter value.
    `prompt` - The parameter prompt text.
    `values` - The parameter default values.
    `bindValues` - The parameter bound values.

### ParameterInfo

    public ParameterInfo(java.lang.String name,
                         java.lang.String desc,
                         java.lang.String type,
                         java.lang.String prompt,
                         java.lang.String format,
                         int operator,
                         int index)

  Constructor. Creates a parameter information object.

  Parameters:
    `name` - The parameter name.
    `desc` - The parameter description.
    `prompt` - The parameter prompt text.
    `type` - The string value of the parameter data type. Useful constants for the type:
    - `CatalogAPI.INTEGER`
    - `CatalogAPI.NUMBER`
    - `CatalogAPI.STRING`
    - `CatalogAPI.CURRENCY`
    - `CatalogAPI.BOOLEAN`
    - `CatalogAPI.DATE`
    - `CatalogAPI.TIME`
    - `CatalogAPI.DATETIME`
    - `CatalogAPI.BINARY`
    - `CatalogAPI.PARAMETERS`
    `format` - The user defined format of the parameter.
    `operator` - The operator of the limit value.
    `index` - The index of the parameter default Value.

Method Detail

### getName

    public java.lang.String getName()

  Gets the parameter name.

  Returns:
    parameter name.

### setName

    public void setName(java.lang.String name)

  Sets the parameter name.

  Parameters:
    `name` - Parameter name.

### getDescription

    public java.lang.String getDescription()

  Gets the parameter description.

  Returns:
    parameter description text.

### setDescription

    public void setDescription(java.lang.String desc)

  Sets the parameter description.

  Parameters:
    `desc` - Parameter's description text.

### getPrompt

    public java.lang.String getPrompt()

  Gets the parameter prompt text.

  Returns:
    parameter prompt text.

### setPrompt

    public void setPrompt(java.lang.String prompt)

  Sets the parameter prompt.

  Parameters:
    `prompt` - The parameter prompt text.

### getType

    public java.lang.String getType()

  Gets the parameter data type.

  Returns:
    parameter type text.

### setType

    public void setType(java.lang.String type)

  Sets the parameter data type.

  Parameters:
    `type` - The string value of the parameter data type. Useful constants for the type:
    - `CatalogAPI.INTEGER`
    - `CatalogAPI.NUMBER`
    - `CatalogAPI.STRING`
    - `CatalogAPI.CURRENCY`
    - `CatalogAPI.BOOLEAN`
    - `CatalogAPI.DATE`
    - `CatalogAPI.TIME`
    - `CatalogAPI.DATETIME`
    - `CatalogAPI.PARAMETERS`

### getDefaultValues

    public java.lang.String[] getDefaultValues()

  Gets the parameter default values.

  Returns:
    parameter default values array.

### setDefaultValue

    public void setDefaultValue(java.lang.String value)

  Sets the parameter default value.

  Parameters:
    `Value` - parameter default value.

### deleteDefaultValue

    public boolean deleteDefaultValue(java.lang.String value)

  Deletes the parameter default value from the value list.

  Parameters:
    `Value` - String format value to be deleted.

### deleteDefaultValue

    public boolean deleteDefaultValue(int index)

  Deletes the parameter default value.

  Parameters:
    `Index` - of the value to be deleted in the value list.

### getLimit

    public java.lang.String[] getLimit()

  Gets the parameter limit values. The limit values only have two elements. The first element specifies the minimum value allowed for the parameter. If the parameter value type is String, this option is defined as Minimum Length, which means that you can set the minimum allowed length of the string. The second element specifies the maximum value allowed for the parameter. If the parameter value type is String, this option is defined as Maximum Length, which means that you can set the maximum allowed length of the string.

  Returns:
    Parameter limit values array.

### getLimit

    public java.lang.String getLimit(int index)

  Gets the parameter limit value.

  Parameters:
    `index` - Index of limit values. Index is `MIN` or `MAX`.
  Returns:
    the String value of the specified parameter limit.

### setLimit

    public void setLimit(java.lang.String value,
                         int index)

  Sets the parameter limit value.

  Parameters:
    `value` - The String value of the parameter limit.
    `index` - Index of limit values. Index is one of `MIN` and `MAX`.

### deleteLimit

    public boolean deleteLimit(java.lang.String value)

  Deletes the parameter limied value.

  Parameters:
    `value` - String value of the parameter limit to be deleted.
  Returns:
    `true` if the value is deleted successfully; `false`if there is no limit value match it.``

### deleteLimit

    public boolean deleteLimit(int index)

  Deletes the parameter limit value.

  Parameters:
    `index` - Index of the limit value to be deleted. Index is one of `MIN` and `MAX`.
  Returns:
    `true` if the value is deleted successfully; `false`otherwise.``

### getValue

    public java.lang.String getValue()

  Gets the String format value of the parameter.

  Returns:
    value string of the parameter.

### setValue

    public void setValue(java.lang.String value)

  Sets the parameter value.

  Parameters:
    `Value` - String format value of the parameter.

### getFormat

    public java.lang.String getFormat()

  Gets the parameter user defined format. For certain types of parameters, the value format supplied by JReport may not satisfy your requirement. In this case, you can define your own preferred format. When you have defined the value format, all the values you supply at runtime should be based on it. Otherwise there will be an error message. Notes:
  - The letters that stand for the user defined format should follow the JDK standard. In addition, the user defined format only limits the format of the input value, which does not mean that the display value will be in the same format. To change the display format, you will need to specify the Format property of this parameter in the Report Inspector.
  - The user defined format will show different appearance under different locale, and you need input values according to the displayed format. For example, under the Spanish or French locale, ####.## will be displayed as #0,## and you should follow #0,## to input values.

  Returns:
    parameter format String.

### setFormat

    public void setFormat(java.lang.String format)

  Sets the parameter's format. For certain types of parameters, the value format supplied by JReport may not satisfy your requirement. In this case, you can define your own preferred format. When you have defined the value format, all the values you supply at runtime should be based on it. Otherwise there will be an error message. Notes:
  - The letters that stand for the user defined format should follow the JDK standard. In addition, the user defined format only limits the format of the input value, which does not mean that the display value will be in the same format. To change the display format, you will need to specify the Format property of this parameter in the Report Inspector.
  - The user defined format will show different appearance under different locale, and you need input values according to the displayed format. For example, under the Spanish or French locale, ####.## will be displayed as #0,## and you should follow #0,## to input values.

  Parameters:
    `format` - User defined format.

### getIndex

    public int getIndex()

  Gets the default value index of the parameter's value list.

  Returns:
    default value index.

### setIndex

    public void setIndex(int index)

  Sets the default value index of the parameter's value list.

  Parameters:
    `index` - Default value index.

### getOperator

    public int getOperator()

  Gets the parameter limit operator. Currently only `BETWEEN` is supported.

  Returns:
    operator type.

### setOperator

    public void setOperator(int operator)

  Sets the parameter limit operator.

  Parameters:
    `operator` - The int value of the operator type. Currently only `BETWEEN` is supported.

### getValueLength

    public int getValueLength()

  Gets the number of the parameter default values.

  Returns:
    numbers of the values.

### clearDefaultValue

    public void clearDefaultValue()

  Clears the parameter default values.

### getBindValues

    public java.lang.String[] getBindValues()

  Gets the parameter bound values.

  Returns:
    parameter bound values.

### setBindValues

    public void setBindValues(java.lang.String[] bindValues)

  Sets the parameter bound values.

  Parameters:
    `bindValues` - Parameter bound values.

### getIsBindColumn

    public boolean getIsBindColumn()

  Checks whether the parameter is bound to a column. The column is the field of the query.

  Returns:
    `true` if parameter is bound to a column; `false` otherwise.

### setIsBindColumn

    public void setIsBindColumn(boolean isBindColumn)

  Sets the parameter if it is bound to a column. The column is the field of the query.

  Parameters:
    `isBindColumn` - Sets `true` if the parameter is bound to the column.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD