Package quadbase.reportdesigner.util
Class SimpleQueryInParam
java.lang.Object
quadbase.reportdesigner.util.SimpleQueryInParam
- All Implemented Interfaces:
quadbase.common.util.IQueryInParam,IQueryInParam
- Direct Known Subclasses:
SimpleQueryMultiValueInParam
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleQueryInParam(String paramName, String promptName, boolean mapToColumn, boolean mapToFunction, String tableName, String fullFunction, int sqlType, Object defaultValue, Object value) SimpleQueryInParam(String paramName, String promptName, boolean mapToColumn, boolean mapToFunction, String tableName, String fullFunction, String sqlSelect, int sqlType, Object defaultValue, String defaultSql, boolean allOptionEnabled, String allOptionLabel, Object value) SimpleQueryInParam(String paramName, String promptName, boolean mapToColumn, String tableName, String columnName, int sqlType, Object defaultValue, Object value) -
Method Summary
Modifier and TypeMethodDescriptionReturns the column nameReturns the default valuequadbase.common.formula.FormulaReturns default value of a date parameter as a date expression (ex.Returns 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.quadbase.common.formula.FormulaReturns value of a date parameter as a date expression (ex.booleanbooleanIf isMapToColumn() returns true, getTableName() and getColumnName() will be called to find out all distinct values from database.booleanbooleanvoidsetAllOptionEnabled(boolean isAllOptionEnabled) voidsetAllOptionLabel(String allOptionLabel) voidsetColumnName(String columnName) Set the column namevoidsetDefaultSql(String defaultSql) voidsetDefaultValue(Object defaultValue) Set default valuevoidsetDefaultValueVariable(quadbase.common.formula.Formula f) Set default value of a date parameter to a date expression (ex.voidsetMapToColumn(boolean mapToColumn) Enables or disables mapToColumn.voidsetMapToFunction(boolean mapToFunction) voidsetPromptName(String promptName) Set the description of the parameter displayed on the pop up dialog.voidsetSqlSelect(String sqlSelect) voidsetSqlType(int sqlType) Set java.sql.TypesvoidsetTableName(String tableName) Set the table namevoidSet the defined value.voidsetValueVariable(quadbase.common.formula.Formula f) Set value of a date parameter to a date expression (ex.toString()static SimpleQueryInParamvalueOf(quadbase.common.util.IQueryInParam p)
-
Field Details
-
value
-
-
Constructor Details
-
SimpleQueryInParam
-
SimpleQueryInParam
-
SimpleQueryInParam
-
-
Method Details
-
getParamName
Description copied from interface:IQueryInParamReturns 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- Specified by:
getParamNamein interfaceIQueryInParam- See Also:
-
getPromptName
Description copied from interface:IQueryInParamReturns the description of the parameter displayed on the pop up dialog.- Specified by:
getPromptNamein interfacequadbase.common.util.IQueryInParam- Specified by:
getPromptNamein interfaceIQueryInParam
-
setPromptName
Description copied from interface:IQueryInParamSet the description of the parameter displayed on the pop up dialog.- Specified by:
setPromptNamein interfacequadbase.common.util.IQueryInParam- Specified by:
setPromptNamein interfaceIQueryInParam
-
isMapToColumn
public boolean isMapToColumn()Description copied from interface:IQueryInParamIf 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- Specified by:
isMapToColumnin interfaceIQueryInParam
-
isMapToColumnOnly
public boolean isMapToColumnOnly() -
setMapToColumn
public void setMapToColumn(boolean mapToColumn) Description copied from interface:IQueryInParamEnables or disables mapToColumn.- Specified by:
setMapToColumnin interfacequadbase.common.util.IQueryInParam- Specified by:
setMapToColumnin interfaceIQueryInParam
-
isMapToFunctionOnly
public boolean isMapToFunctionOnly() -
setMapToFunction
public void setMapToFunction(boolean mapToFunction) -
getTableName
Description copied from interface:IQueryInParamReturns the table name- Specified by:
getTableNamein interfacequadbase.common.util.IQueryInParam- Specified by:
getTableNamein interfaceIQueryInParam- See Also:
-
setTableName
Description copied from interface:IQueryInParamSet the table name- Specified by:
setTableNamein interfacequadbase.common.util.IQueryInParam- Specified by:
setTableNamein interfaceIQueryInParam
-
getColumnName
Description copied from interface:IQueryInParamReturns the column name- Specified by:
getColumnNamein interfacequadbase.common.util.IQueryInParam- Specified by:
getColumnNamein interfaceIQueryInParam- See Also:
-
setColumnName
Description copied from interface:IQueryInParamSet the column name- Specified by:
setColumnNamein interfacequadbase.common.util.IQueryInParam- Specified by:
setColumnNamein interfaceIQueryInParam
-
getSqlType
public int getSqlType()Description copied from interface:IQueryInParamReturns java.sql.Types- Specified by:
getSqlTypein interfacequadbase.common.util.IQueryInParam- Specified by:
getSqlTypein interfaceIQueryInParam- See Also:
-
setSqlType
public void setSqlType(int sqlType) Description copied from interface:IQueryInParamSet java.sql.Types- Specified by:
setSqlTypein interfacequadbase.common.util.IQueryInParam- Specified by:
setSqlTypein interfaceIQueryInParam
-
getDefaultValue
Description copied from interface:IQueryInParamReturns the default value- Specified by:
getDefaultValuein interfacequadbase.common.util.IQueryInParam- Specified by:
getDefaultValuein interfaceIQueryInParam
-
setDefaultValue
Description copied from interface:IQueryInParamSet default value- Specified by:
setDefaultValuein interfacequadbase.common.util.IQueryInParam- Specified by:
setDefaultValuein interfaceIQueryInParam
-
getValue
Description copied from interface:IQueryInParamProgrammers 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- Specified by:
getValuein interfaceIQueryInParam
-
setValue
Description copied from interface:IQueryInParamSet 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- Specified by:
setValuein interfaceIQueryInParam
-
getDefaultValueVariable
public 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
public 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
public quadbase.common.formula.Formula getValueVariable()Returns value of a date parameter as a date expression (ex. CurrentDate - 1 WEEK)- Returns:
- Formula date expression
-
setValueVariable
public 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
-
setSqlSelect
-
getSqlSelect
-
isAllOptionEnabled
public boolean isAllOptionEnabled() -
setAllOptionEnabled
public void setAllOptionEnabled(boolean isAllOptionEnabled) -
getAllOptionLabel
-
setAllOptionLabel
-
valueOf
-
toString
-
getDefaultSql
- Specified by:
getDefaultSqlin interfacequadbase.common.util.IQueryInParam
-
setDefaultSql
- Specified by:
setDefaultSqlin interfacequadbase.common.util.IQueryInParam
-