EspressChart
v 5.5

quadbase.common.param
Class AbstractParam

java.lang.Object
  |
  +--quadbase.common.param.AbstractParam
All Implemented Interfaces:
Param
Direct Known Subclasses:
FormulaParam, QueryParam

public abstract class AbstractParam
extends java.lang.Object
implements Param


Field Summary
protected  quadbase.reportdesigner.report.Parameter parameter
           
protected  java.lang.String parent
           
 
Fields inherited from interface quadbase.common.param.Param
ROOT_REPORT
 
Constructor Summary
AbstractParam(java.lang.String parent)
           
AbstractParam(java.lang.String parent, quadbase.reportdesigner.report.Parameter parameter)
           
 
Method Summary
 java.lang.String getColumnName()
          If (isMapToColumn() == true) Returns the column name
 java.lang.String getDateFormat()
          The custom date format.
 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.
 quadbase.reportdesigner.report.Parameter getParameter()
           
 java.lang.String getPromptName()
          Returns the description of the parameter displayed on the pop up dialog.
 quadbase.common.util.IQueryFileInfo getQueryFileInfo()
          internal use only
 int getReferenceDegree()
           
 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 getSharedParamName()
           
 java.lang.String getSharedReportName()
           
 java.lang.String getSqlSelect()
           
 int getSqlType()
          Returns java.sql.Types
 java.lang.String getTableName()
          If (isMapToColumn() == true) Returns the table name
 java.lang.Object getValue()
          Returns the current value of the paremeter as the appropriate java object.
 java.util.Vector getValues()
          If (this.multiValue() == true), 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 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 isShared()
           
 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() == true) Set the column name
 void setDefaultValue(java.lang.Object defaultValue)
          Set default value
 void setDefaultValueVariable(quadbase.common.formula.Formula formula)
          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 sql)
           
 void setSqlType(int sqlType)
          Set java.sql.Types
 void setTableName(java.lang.String tableName)
          If (isMapToColumn() == true) 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() == false).
 void setValues(java.util.Vector values)
          If (this.multiValue() == true), Sets the current values of the parameter as a Vector of the appropriate java objects, else returns null.
 void setValueVariable(quadbase.common.formula.Formula formula)
          Set value of a date parameter to a date expression (ex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface quadbase.common.param.Param
isFormulaParam
 

Field Detail

parent

protected java.lang.String parent

parameter

protected quadbase.reportdesigner.report.Parameter parameter
Constructor Detail

AbstractParam

public AbstractParam(java.lang.String parent)

AbstractParam

public AbstractParam(java.lang.String parent,
                     quadbase.reportdesigner.report.Parameter parameter)
Method Detail

parent

public java.lang.String parent()
Description copied from interface: Param
The name of the template that contains this parameter.
Specified by:
parent in interface Param
Following copied from interface: quadbase.common.param.Param
Returns:
the name of the template that contains this parameter, or Param.ROOT_REPORT if this is the root (main) report.

name

public java.lang.String name()
Description copied from interface: Param
The name of this parameter
Specified by:
name in interface Param

getPromptName

public java.lang.String getPromptName()
Description copied from interface: Param
Returns the description of the parameter displayed on the pop up dialog.
Specified by:
getPromptName in interface Param

setPromptName

public void setPromptName(java.lang.String promptName)
Description copied from interface: Param
Set the description of the parameter displayed on the pop up dialog.
Specified by:
setPromptName in interface Param

isCustomDateFormat

public boolean isCustomDateFormat()
Description copied from interface: Param
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.
Specified by:
isCustomDateFormat in interface Param

getDateFormat

public java.lang.String getDateFormat()
Description copied from interface: Param
The custom date format.
Specified by:
getDateFormat in interface Param
Following copied from interface: quadbase.common.param.Param
See Also:
Param.isCustomDateFormat()

isMapToColumn

public boolean isMapToColumn()
Description copied from interface: Param
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.
Specified by:
isMapToColumn in interface Param

setMapToColumn

public void setMapToColumn(boolean mapToColumn)
Description copied from interface: Param
Enables or disables mapToColumn.
Specified by:
setMapToColumn in interface Param
Following copied from interface: quadbase.common.param.Param
See Also:
Param.isMapToColumn()

getTableName

public java.lang.String getTableName()
Description copied from interface: Param
If (isMapToColumn() == true) Returns the table name
Specified by:
getTableName in interface Param
Following copied from interface: quadbase.common.param.Param
See Also:
Param.isMapToColumn()

setTableName

public void setTableName(java.lang.String tableName)
Description copied from interface: Param
If (isMapToColumn() == true) Set the table name
Specified by:
setTableName in interface Param
Following copied from interface: quadbase.common.param.Param
See Also:
Param.isMapToColumn()

getColumnName

public java.lang.String getColumnName()
Description copied from interface: Param
If (isMapToColumn() == true) Returns the column name
Specified by:
getColumnName in interface Param
Following copied from interface: quadbase.common.param.Param
See Also:
Param.isMapToColumn()

setColumnName

public void setColumnName(java.lang.String columnName)
Description copied from interface: Param
If (isMapToColumn() == true) Set the column name
Specified by:
setColumnName in interface Param
Following copied from interface: quadbase.common.param.Param
See Also:
Param.isMapToColumn()

getSqlType

public int getSqlType()
Returns java.sql.Types
Specified by:
getSqlType in interface Param

setSqlType

public void setSqlType(int sqlType)
Set java.sql.Types
Specified by:
setSqlType in interface Param

multiValue

public boolean multiValue()
Whether this parameter can take multiple values. If true, then calling setValue(Vector) sets multiple values.
Specified by:
multiValue in interface Param

getValue

public java.lang.Object getValue()
Returns the current value of the paremeter as the appropriate java object. Returns null if (this.multiValue() == true).
Specified by:
getValue in interface Param

getValues

public java.util.Vector getValues()
If (this.multiValue() == true), returns the current values of the parameter as a Vector of the appropriate java objects, else returns null.
Specified by:
getValues in interface Param

setValue

public void setValue(java.lang.Object value)
Sets the current value of the paremeter as the appropriate java object if and only if (this.multiValue() == false).
Specified by:
setValue in interface Param

setValues

public void setValues(java.util.Vector values)
If (this.multiValue() == true), Sets the current values of the parameter as a Vector of the appropriate java objects, else returns null.
Specified by:
setValues in interface Param

getDefaultValue

public java.lang.Object getDefaultValue()
Returns the default value.
Specified by:
getDefaultValue in interface Param

setDefaultValue

public void setDefaultValue(java.lang.Object defaultValue)
Set default value
Specified by:
setDefaultValue in interface Param

getDefaultValueVariable

public quadbase.common.formula.Formula getDefaultValueVariable()
Returns default value of a date parameter as a date expression (ex. CurrentDate - 1 WEEK)
Specified by:
getDefaultValueVariable in interface Param
Returns:
Formula date expression

setDefaultValueVariable

public void setDefaultValueVariable(quadbase.common.formula.Formula formula)
Set default value of a date parameter to a date expression (ex. CurrentDate - 1 WEEK)
Specified by:
setDefaultValueVariable in interface Param
Parameters:
Formula - date expression

getValueVariable

public quadbase.common.formula.Formula getValueVariable()
Returns value of a date parameter as a date expression (ex. CurrentDate - 1 WEEK)
Specified by:
getValueVariable in interface Param
Returns:
Formula date expression

setValueVariable

public void setValueVariable(quadbase.common.formula.Formula formula)
Set value of a date parameter to a date expression (ex. CurrentDate - 1 WEEK)
Specified by:
setValueVariable in interface Param
Parameters:
Formula - date expression

getSelectionChoices

public java.util.Vector getSelectionChoices()
Description copied from interface: Param
Gets a Vector of objects of the corresponding SQL type that are unique values of this parameter retrieved from the database.
Specified by:
getSelectionChoices in interface Param
Following copied from interface: quadbase.common.param.Param
Returns:
null if a selection is not available

getQueryFileInfo

public quadbase.common.util.IQueryFileInfo getQueryFileInfo()
Description copied from interface: Param
internal use only
Specified by:
getQueryFileInfo in interface Param

setQueryFileInfo

public void setQueryFileInfo(quadbase.common.util.IQueryFileInfo qf)
Description copied from interface: Param
internal use only
Specified by:
setQueryFileInfo in interface Param

getReport

public quadbase.reportdesigner.report.Report getReport()
Description copied from interface: Param
internal use only
Specified by:
getReport in interface Param

setReport

public void setReport(quadbase.reportdesigner.report.Report r)
Description copied from interface: Param
internal use only
Specified by:
setReport in interface Param

isShared

public boolean isShared()

getSharedReportName

public java.lang.String getSharedReportName()

getSharedParamName

public java.lang.String getSharedParamName()

getReferenceDegree

public int getReferenceDegree()

getParameter

public quadbase.reportdesigner.report.Parameter getParameter()

getSqlSelect

public java.lang.String getSqlSelect()
Specified by:
getSqlSelect in interface Param

setSqlSelect

public void setSqlSelect(java.lang.String sql)
Specified by:
setSqlSelect in interface Param

EspressChart
v 5.5