Interface IQueryInParam

All Superinterfaces:
quadbase.common.util.IQueryInParam
All Known Subinterfaces:
IQueryMultiValueInParam
All Known Implementing Classes:
SimpleQueryInParam, SimpleQueryMultiValueInParam

public interface IQueryInParam extends quadbase.common.util.IQueryInParam
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the column name
    Returns the default value
    Returns the parameter name which is used in the SQL statement.
    Returns the description of the parameter displayed on the pop up dialog.
    int
    Returns java.sql.Types
    Returns the table name
    Programmers sometimes may not want to show the initial parameter dialog when the chart is loaded at the first time.
    boolean
    If isMapToColumn() returns true, getTableName() and getColumnName() will be called to find out all distinct values from database.
    void
    setColumnName(String columnName)
    Set the column name
    void
    setDefaultValue(Object defaultValue)
    Set default value
    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
    setSqlType(int sqlType)
    Set java.sql.Types
    void
    setTableName(String tableName)
    Set the table name
    void
    Set the defined value.

    Methods inherited from interface quadbase.common.util.IQueryInParam

    getDefaultSql, setDefaultSql
  • Method Details

    • getParamName

      String getParamName()
      Returns the parameter name which is used in the SQL statement. Every colon in the SQL statement is immediately followed by a parameter name. For instance: "select drink, quantity, high, low from table1 where drink = :param1 and quantity > :param2 and :param2 > low and :param2 invalid input: '<' high" This statement has two parameters, param1 and param2. QbChart uses IQueryFileInfo to create a parameterized query to retrieve data from database. A user-friendly dialog pops up to let users input the values of the parameters in run time. The some dialog pops up later again when users press Ctrl-E (E for enter/edit parameters).
      Specified by:
      getParamName in interface quadbase.common.util.IQueryInParam
      See Also:
    • getPromptName

      String getPromptName()
      Returns the description of the parameter displayed on the pop up dialog.
      Specified by:
      getPromptName in interface quadbase.common.util.IQueryInParam
    • setPromptName

      void setPromptName(String promptName)
      Set the description of the parameter displayed on the pop up dialog.
      Specified by:
      setPromptName in interface quadbase.common.util.IQueryInParam
    • isMapToColumn

      boolean isMapToColumn()
      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 quadbase.common.util.IQueryInParam
    • setMapToColumn

      void setMapToColumn(boolean mapToColumn)
      Enables or disables mapToColumn.
      Specified by:
      setMapToColumn in interface quadbase.common.util.IQueryInParam
    • getTableName

      String getTableName()
      Returns the table name
      Specified by:
      getTableName in interface quadbase.common.util.IQueryInParam
      See Also:
    • setTableName

      void setTableName(String tableName)
      Set the table name
      Specified by:
      setTableName in interface quadbase.common.util.IQueryInParam
    • getColumnName

      String getColumnName()
      Returns the column name
      Specified by:
      getColumnName in interface quadbase.common.util.IQueryInParam
      See Also:
    • setColumnName

      void setColumnName(String columnName)
      Set the column name
      Specified by:
      setColumnName in interface quadbase.common.util.IQueryInParam
    • getSqlType

      int getSqlType()
      Returns java.sql.Types
      Specified by:
      getSqlType in interface quadbase.common.util.IQueryInParam
      See Also:
    • setSqlType

      void setSqlType(int sqlType)
      Set java.sql.Types
      Specified by:
      setSqlType in interface quadbase.common.util.IQueryInParam
    • getDefaultValue

      Object getDefaultValue()
      Returns the default value
      Specified by:
      getDefaultValue in interface quadbase.common.util.IQueryInParam
    • setDefaultValue

      void setDefaultValue(Object defaultValue)
      Set default value
      Specified by:
      setDefaultValue in interface quadbase.common.util.IQueryInParam
    • getValue

      Object getValue()
      Programmers sometimes may not want to show the initial parameter dialog when the chart is loaded at the first time. This can be done if every parameter in IQueryFileInfo has a pre-defined non-null values. When the parameterized query is processed by the database, the parameter value is set to null automatically. Note that the defined values are not stored in query files (*.qry).
      Specified by:
      getValue in interface quadbase.common.util.IQueryInParam
    • setValue

      void setValue(Object value)
      Set the defined value. The parameter value is set to null automatically when it is processed by the database query.
      Specified by:
      setValue in interface quadbase.common.util.IQueryInParam