Package quadbase.reportdesigner.util
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 TypeMethodDescriptionReturns the column nameReturns the default valueReturns the parameter name which is used in the SQL statement.Returns the description of the parameter displayed on the pop up dialog.intReturns java.sql.TypesReturns the table namegetValue()Programmers sometimes may not want to show the initial parameter dialog when the chart is loaded at the first time.booleanIf isMapToColumn() returns true, getTableName() and getColumnName() will be called to find out all distinct values from database.voidsetColumnName(String columnName) Set the column namevoidsetDefaultValue(Object defaultValue) Set default valuevoidsetMapToColumn(boolean mapToColumn) Enables or disables mapToColumn.voidsetPromptName(String promptName) Set the description of the parameter displayed on the pop up dialog.voidsetSqlType(int sqlType) Set java.sql.TypesvoidsetTableName(String tableName) Set the table namevoidSet 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:
getParamNamein interfacequadbase.common.util.IQueryInParam- See Also:
-
getPromptName
String getPromptName()Returns the description of the parameter displayed on the pop up dialog.- Specified by:
getPromptNamein interfacequadbase.common.util.IQueryInParam
-
setPromptName
Set the description of the parameter displayed on the pop up dialog.- Specified by:
setPromptNamein interfacequadbase.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:
isMapToColumnin interfacequadbase.common.util.IQueryInParam
-
setMapToColumn
void setMapToColumn(boolean mapToColumn) Enables or disables mapToColumn.- Specified by:
setMapToColumnin interfacequadbase.common.util.IQueryInParam
-
getTableName
String getTableName()Returns the table name- Specified by:
getTableNamein interfacequadbase.common.util.IQueryInParam- See Also:
-
setTableName
Set the table name- Specified by:
setTableNamein interfacequadbase.common.util.IQueryInParam
-
getColumnName
String getColumnName()Returns the column name- Specified by:
getColumnNamein interfacequadbase.common.util.IQueryInParam- See Also:
-
setColumnName
Set the column name- Specified by:
setColumnNamein interfacequadbase.common.util.IQueryInParam
-
getSqlType
int getSqlType()Returns java.sql.Types- Specified by:
getSqlTypein interfacequadbase.common.util.IQueryInParam- See Also:
-
setSqlType
void setSqlType(int sqlType) Set java.sql.Types- Specified by:
setSqlTypein interfacequadbase.common.util.IQueryInParam
-
getDefaultValue
Object getDefaultValue()Returns the default value- Specified by:
getDefaultValuein interfacequadbase.common.util.IQueryInParam
-
setDefaultValue
Set default value- Specified by:
setDefaultValuein interfacequadbase.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:
getValuein interfacequadbase.common.util.IQueryInParam
-
setValue
Set the defined value. The parameter value is set to null automatically when it is processed by the database query.- Specified by:
setValuein interfacequadbase.common.util.IQueryInParam
-