EspressChart
v 5.5

quadbase.util
Interface IQueryInParam

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

public interface IQueryInParam
extends quadbase.common.util.IQueryInParam


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

Method Detail

getParamName

public java.lang.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 < 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:
IQueryFileInfo

getPromptName

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

setPromptName

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

isMapToColumn

public 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

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

getTableName

public java.lang.String getTableName()
Returns the table name
Specified by:
getTableName in interface quadbase.common.util.IQueryInParam
See Also:
isMapToColumn()

setTableName

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

getColumnName

public java.lang.String getColumnName()
Returns the column name
Specified by:
getColumnName in interface quadbase.common.util.IQueryInParam
See Also:
isMapToColumn()

setColumnName

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

getSqlType

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

setSqlType

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

getDefaultValue

public java.lang.Object getDefaultValue()
Returns the default value
Specified by:
getDefaultValue in interface quadbase.common.util.IQueryInParam

setDefaultValue

public void setDefaultValue(java.lang.Object defaultValue)
Set default value
Specified by:
setDefaultValue in interface quadbase.common.util.IQueryInParam

getValue

public java.lang.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

public void setValue(java.lang.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

EspressChart
v 5.5