EspressReport 6.6

quadbase.common.param
Interface Param


public interface Param

This interface represents a parameter used in a template, it can be used to retrieve information about the parameter such as name, prompt name, as well as set or get its current values.

See Also:
Parameters

Field Summary
static java.lang.String ROOT_REPORT
          This is the parent() value of a Param who belongs to the root report (non sub report).
 
Method Summary
 java.lang.String getColumnName()
          If (isMapToColumn()) Returns the column name
 java.lang.String getDateFormat()
          The custom date format.
 java.lang.String getDefaultSql()
           
 java.lang.Object getDefaultValue()
          Returns the default value.
 quadbase.common.formula.Formula getDefaultValueVariable()
          Returns default value of a date parameter as a date expression (ex.
 java.lang.String getPromptName()
          Returns the description of the parameter displayed on the pop up dialog.
 quadbase.common.util.IQueryFileInfo getQueryFileInfo()
          internal use only
 quadbase.reportdesigner.report.Report getReport()
          internal use only
 java.util.Vector getSelectionChoices()
          Gets a Vector of objects of the corresponding SQL type that are unique values of this parameter retrieved from the database.
 java.lang.String getSqlSelect()
           
 int getSqlType()
          Returns java.sql.Types
 java.lang.String getTableName()
          If (isMapToColumn()) Returns the table name
 java.lang.Object getValue()
          Returns the current value of the parameter as the appropriate java object.
 java.util.Vector getValues()
          If (this.multiValue()), returns the current values of the parameter as a Vector of the appropriate java objects, else returns null.
 quadbase.common.formula.Formula getValueVariable()
          Returns value of a date parameter as a date expression (ex.
 boolean isCustomDateFormat()
          Whether this parameter is a date and its value provided by the user with setValue() is a custom date format.
 boolean isFormulaParam()
          Whether this is a formula parameter (not query parameter)
 boolean isMapToColumn()
          When using the parameter dialog or the ParameterPageWriter this attributes is used to control whether a selection list or a input text box is used.
 boolean isUnmapped()
           
 boolean multiValue()
          Whether this parameter can take multiple values.
 java.lang.String name()
          The name of this parameter
 java.lang.String parent()
          The name of the template that contains this parameter.
 void setColumnName(java.lang.String columnName)
          If (isMapToColumn()) Set the column name
 void setDefaultSql(java.lang.String s)
           
 void setDefaultValue(java.lang.Object defaultValue)
          Set default value
 void setDefaultValueVariable(quadbase.common.formula.Formula f)
          Set default value of a date parameter to a date expression (ex.
 void setMapToColumn(boolean mapToColumn)
          Enables or disables mapToColumn.
 void setPromptName(java.lang.String promptName)
          Set the description of the parameter displayed on the pop up dialog.
 void setQueryFileInfo(quadbase.common.util.IQueryFileInfo qf)
          internal use only
 void setReport(quadbase.reportdesigner.report.Report r)
          internal use only
 void setSqlSelect(java.lang.String s)
           
 void setSqlType(int sqlType)
          Set java.sql.Types
 void setTableName(java.lang.String tableName)
          If (isMapToColumn()) Set the table name
 void setValue(java.lang.Object value)
          Sets the current value of the paremeter as the appropriate java object if and only if (!this.multiValue()).
 void setValues(java.util.Vector values)
          If (this.multiValue()), Sets the current values of the parameter as a Vector of the appropriate java objects, else returns null.
 void setValueVariable(quadbase.common.formula.Formula f)
          Set value of a date parameter to a date expression (ex.
 

Field Detail

ROOT_REPORT

static final java.lang.String ROOT_REPORT
This is the parent() value of a Param who belongs to the root report (non sub report).

See Also:
Constant Field Values
Method Detail

name

java.lang.String name()
The name of this parameter


parent

java.lang.String parent()
The name of the template that contains this parameter.

Returns:
the name of the template that contains this parameter, or Param.ROOT_REPORT if this is the root (main) report.

getPromptName

java.lang.String getPromptName()
Returns the description of the parameter displayed on the pop up dialog.


setPromptName

void setPromptName(java.lang.String promptName)
Set the description of the parameter displayed on the pop up dialog.


isFormulaParam

boolean isFormulaParam()
Whether this is a formula parameter (not query parameter)


isCustomDateFormat

boolean isCustomDateFormat()
Whether this parameter is a date and its value provided by the user with setValue() is a custom date format. If true, it allows the user to provide a custom date format to convert a string into a java Date object. This can be used for parameters with type DATE, TIME, or TIMESTAMP. This is only applicable if the parameter value is to be filled in by the user and not chosen from a list of predefined values. The date format should follow the guidlines defined in java.text.SimpleDateFormat.


getDateFormat

java.lang.String getDateFormat()
The custom date format.

See Also:
isCustomDateFormat()

isMapToColumn

boolean isMapToColumn()
When using the parameter dialog or the ParameterPageWriter this attributes is used to control whether a selection list or a input text box is used. If true, a selection list is used, else a text box.
If isMapToColumn() returns true, getTableName() and getColumnName() will be called to find out all distinct values from database. Then the values will be displayed in a choice box. The java.sql.Types of the column is retrived from the meta data of database.
If isMapToColumn() returns false, getSqlType() is called to get the java.sql.Types of the input value. A text field will be shown instead of a choice box. It is useful if you don't want to expose the contents of database.


setMapToColumn

void setMapToColumn(boolean mapToColumn)
Enables or disables mapToColumn.

See Also:
isMapToColumn()

getTableName

java.lang.String getTableName()
If (isMapToColumn()) Returns the table name

See Also:
isMapToColumn()

setTableName

void setTableName(java.lang.String tableName)
If (isMapToColumn()) Set the table name

See Also:
isMapToColumn()

getColumnName

java.lang.String getColumnName()
If (isMapToColumn()) Returns the column name

See Also:
isMapToColumn()

setColumnName

void setColumnName(java.lang.String columnName)
If (isMapToColumn()) Set the column name

See Also:
isMapToColumn()

getSqlType

int getSqlType()
Returns java.sql.Types


setSqlType

void setSqlType(int sqlType)
Set java.sql.Types


multiValue

boolean multiValue()
Whether this parameter can take multiple values. If true, then calling setValue(Vector) sets multiple values.


getValue

java.lang.Object getValue()
Returns the current value of the parameter as the appropriate java object. Returns null if (this.multiValue()).


getValues

java.util.Vector getValues()
If (this.multiValue()), returns the current values of the parameter as a Vector of the appropriate java objects, else returns null.


setValue

void setValue(java.lang.Object value)
Sets the current value of the paremeter as the appropriate java object if and only if (!this.multiValue()).


setValues

void setValues(java.util.Vector values)
If (this.multiValue()), Sets the current values of the parameter as a Vector of the appropriate java objects, else returns null.


getDefaultValue

java.lang.Object getDefaultValue()
Returns the default value.


setDefaultValue

void setDefaultValue(java.lang.Object defaultValue)
Set default value


getDefaultValueVariable

quadbase.common.formula.Formula getDefaultValueVariable()
Returns default value of a date parameter as a date expression (ex. CurrentDate - 1 WEEK)

Returns:
Formula date expression

setDefaultValueVariable

void setDefaultValueVariable(quadbase.common.formula.Formula f)
Set default value of a date parameter to a date expression (ex. CurrentDate - 1 WEEK)

Parameters:
Formula - date expression

getValueVariable

quadbase.common.formula.Formula getValueVariable()
Returns value of a date parameter as a date expression (ex. CurrentDate - 1 WEEK)

Returns:
Formula date expression

setValueVariable

void setValueVariable(quadbase.common.formula.Formula f)
Set value of a date parameter to a date expression (ex. CurrentDate - 1 WEEK)

Parameters:
Formula - date expression

getSelectionChoices

java.util.Vector getSelectionChoices()
Gets a Vector of objects of the corresponding SQL type that are unique values of this parameter retrieved from the database.

Returns:
null if a selection is not available

getSqlSelect

java.lang.String getSqlSelect()

setSqlSelect

void setSqlSelect(java.lang.String s)

getDefaultSql

java.lang.String getDefaultSql()

setDefaultSql

void setDefaultSql(java.lang.String s)

getQueryFileInfo

quadbase.common.util.IQueryFileInfo getQueryFileInfo()
internal use only


setQueryFileInfo

void setQueryFileInfo(quadbase.common.util.IQueryFileInfo qf)
internal use only


getReport

quadbase.reportdesigner.report.Report getReport()
internal use only


setReport

void setReport(quadbase.reportdesigner.report.Report r)
internal use only


isUnmapped

boolean isUnmapped()

EspressReport 6.6