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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    This is the parent() value of a Param who belongs to the root report (non sub report).
  • Method Summary

    Modifier and Type
    Method
    Description
    If (isMapToColumn()) Returns the column name
    The custom date format.
     
    Returns the default value.
    quadbase.common.formula.Formula
    Returns default value of a date parameter as a date expression (ex.
    Returns the description of the parameter displayed on the pop up dialog.
    quadbase.common.util.IQueryFileInfo
    internal use only
    quadbase.reportdesigner.report.Report
    internal use only
    Gets a Vector of objects of the corresponding SQL type that are unique values of this parameter retrieved from the database.
     
    int
    Returns java.sql.Types
    If (isMapToColumn()) Returns the table name
    Returns the current value of the parameter as the appropriate java object.
    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
    Returns value of a date parameter as a date expression (ex.
    boolean
    Whether this parameter is a date and its value provided by the user with setValue() is a custom date format.
    boolean
    Whether this is a formula parameter (not query parameter)
    boolean
    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
     
    boolean
    Whether this parameter can take multiple values.
    The name of this parameter
    The name of the template that contains this parameter.
    void
    setColumnName(String columnName)
    If (isMapToColumn()) Set the column name
    void
     
    void
    setDefaultValue(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(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
     
    void
    setSqlType(int sqlType)
    Set java.sql.Types
    void
    setTableName(String tableName)
    If (isMapToColumn()) Set the table name
    void
    Sets the current value of the paremeter as the appropriate java object if and only if (!this.multiValue()).
    void
    setValues(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 Details

    • ROOT_REPORT

      static final String ROOT_REPORT
      This is the parent() value of a Param who belongs to the root report (non sub report).
      See Also:
  • Method Details

    • name

      String name()
      The name of this parameter
    • parent

      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

      String getPromptName()
      Returns the description of the parameter displayed on the pop up dialog.
    • setPromptName

      void setPromptName(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

      String getDateFormat()
      The custom date format.
      See Also:
    • 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:
    • getTableName

      String getTableName()
      If (isMapToColumn()) Returns the table name
      See Also:
    • setTableName

      void setTableName(String tableName)
      If (isMapToColumn()) Set the table name
      See Also:
    • getColumnName

      String getColumnName()
      If (isMapToColumn()) Returns the column name
      See Also:
    • setColumnName

      void setColumnName(String columnName)
      If (isMapToColumn()) Set the column name
      See Also:
    • 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

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

      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(Object value)
      Sets the current value of the paremeter as the appropriate java object if and only if (!this.multiValue()).
    • setValues

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

      Object getDefaultValue()
      Returns the default value.
    • setDefaultValue

      void setDefaultValue(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

      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

      String getSqlSelect()
    • setSqlSelect

      void setSqlSelect(String s)
    • getDefaultSql

      String getDefaultSql()
    • setDefaultSql

      void setDefaultSql(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()