EspressReport 6.6

quadbase.reportdesigner.report
Class Parameter

java.lang.Object
  extended by quadbase.reportdesigner.report.Operand
      extended by quadbase.reportdesigner.report.Parameter

public class Parameter
extends quadbase.reportdesigner.report.Operand

This class is used for setting parameter default values and values for Queries or Parameterized reports in the Report Designer.


Field Summary
 
Fields inherited from class quadbase.reportdesigner.report.Operand
BOOLEAN, CALENDARFIELD, DATE, NULL, NUMBER, STRING, TIME, TIMESTAMP
 
Constructor Summary
Parameter()
          Allocates a Parameter Object
Parameter(quadbase.common.util.IQueryInParam param)
          Allocates a new Parameter Object with a IQueryInParam specifying options
Parameter(java.lang.String name)
          Allocates a Parameter Object with specified name
Parameter(java.lang.String name, java.lang.Object defaultValue, int datatype)
          Allocates a new Parameter Object with specified name, default value and datatype
 
Method Summary
 void addFormula(java.lang.String formulaName)
          internal use only
static Parameter clone(Parameter _param)
          internal use only
 void copy(Parameter _param)
          internal use only
 void decReferenceDegree()
           
 java.lang.String formatDefaultValue()
          internal use only
 java.lang.String formatValue()
          internal use only
 java.lang.String getAllOptionLabel()
           
 java.lang.String getColumnName()
           
 int getDatatype(quadbase.reportdesigner.report.Report report)
           
 java.lang.String getDateFormat()
           
 java.lang.String getDefaultSql()
           
 java.lang.Object getDefaultValue()
          Gets the default value of the Parameter.
 quadbase.common.formula.Formula getDefaultValueVariable()
           
 java.util.Vector<java.lang.String> getFormulaNames()
          internal use only
 int getMapColIdx()
          internal use only
 java.lang.String getName()
          Gets the Name of the Parameter
 java.lang.String getPromptText()
          internal use only
 quadbase.common.util.IQueryFileInfo getQueryFileInfo()
           
 int getReferenceDegree()
           
 quadbase.reportdesigner.report.Report getReport()
           
 java.lang.String getReportTitle()
           
 java.util.Vector getSelectionChoices()
           
 java.lang.String getSharedParamName()
           
 java.lang.String getSharedReportName()
           
 java.lang.String getSqlSelect()
           
 int getSQLType()
           
 java.lang.String getTableName()
           
 java.lang.Object getValue()
           
 java.lang.Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, java.lang.Object dataobj)
          Gets the value of the parameter.
 java.lang.Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, java.lang.Object dataobj, boolean secondRound)
          internal use only
 java.lang.Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, java.lang.Object dataobj, boolean secondRound, java.util.Vector preAggCol, java.util.Vector resultCol)
          internal use only
 java.lang.Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, java.lang.Object dataobj, boolean secondRound, java.util.Vector preAggCol, java.util.Vector resultCol, quadbase.reportdesigner.report.ColData[] colData)
          internal use only
 java.lang.Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, java.lang.Object dataobj, java.util.Vector preAggCol, java.util.Vector resultCol)
          internal use only
 java.lang.Object getValueFromText(java.lang.String text)
          internal use only
 java.util.Vector getValues()
           
 quadbase.common.formula.Formula getValueVariable()
           
 void incReferenceDegree()
           
 boolean isAllOptionEnabled()
           
 boolean isCustomDateFormat()
           
 boolean isInitialized()
          internal use only
 boolean isMapToColumn()
          internal use only
 boolean isMultiValueParam()
           
 boolean isQueryParamValuesProvider()
           
 boolean isShared()
           
 boolean isShareReferenced()
           
 boolean isUsedBy(java.lang.String formulaName)
          internal use only
 java.lang.Object makeDefaultValueFromText(java.lang.String text)
          internal use only
 void read(java.io.DataInput in, int version)
          internal use only
 void readShareInfo(java.io.DataInput in, int version)
          internal use only
 void readXML(org.w3c.dom.Node node, int version)
          internal use only
 void readXMLShareInfo(org.w3c.dom.Node node, int version)
           
 void removeFormula(java.lang.String formulaName)
          internal use only
 void setAllOptionEnabled(boolean isAllOptionEnabled)
           
 void setAllOptionLabel(java.lang.String allOptionLabel)
           
 void setColumnName(java.lang.String tName)
           
 void setDefaultSql(java.lang.String s)
           
 void setDefaultValue(java.lang.Object value)
          Sets the default value of the Parameter.
 void setDefaultValueVariable(quadbase.common.formula.Formula formula)
           
 void setFormulaNames(java.util.Vector<java.lang.String> names)
          internal use only
 void setMapColIdx(int idx)
          internal use only
 void setMapToColumn(boolean state)
          internal use only
 void setMultiValueParam(boolean b)
           
 void setPromptText(java.lang.String s)
          internal use only
 void setQueryFileInfo(quadbase.common.util.IQueryFileInfo qf)
           
 void setQueryParamValuesProvider(boolean b)
           
 void setReferenceDegree(int i)
           
 void setReport(quadbase.reportdesigner.report.Report r)
           
 void setReportTitle(java.lang.String s)
           
 void setSelectionChoices(java.util.Vector vec)
           
 void setShared(boolean b)
           
 void setSharedParamName(java.lang.String s)
           
 void setSharedReportName(java.lang.String s)
           
 void setSqlSelect(java.lang.String s)
           
 void setSQLType(int type)
           
 void setTableName(java.lang.String tName)
           
 void setValue(java.lang.Object value)
          Sets the value of the parameter.
 void setValues(java.util.Vector values)
           
 void setValueVariable(quadbase.common.formula.Formula formula)
           
 java.lang.String toString()
          internal use only
 void write(java.io.DataOutput out)
          internal use only
 void write(java.io.DataOutput out, boolean saveValue)
           
 void writeShareInfo(java.io.DataOutput out)
          internal use only
 void writeXML(java.io.Writer out)
          internal use only
 void writeXMLShareInfo(java.io.Writer out)
           
 
Methods inherited from class quadbase.reportdesigner.report.Operand
isDate, mapToOperandType, setDatatype, setThisDataType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parameter

public Parameter()
Allocates a Parameter Object


Parameter

public Parameter(java.lang.String name)
Allocates a Parameter Object with specified name


Parameter

public Parameter(java.lang.String name,
                 java.lang.Object defaultValue,
                 int datatype)
Allocates a new Parameter Object with specified name, default value and datatype

Parameters:
name - the name of the parameter, unique inside the formula
defaultValue - the value this parameter default to, must be consistent with the datatype
datatype - needs to be one of the following 0(Operand.NUMBER) for number 1(Operand.STRING) for string 2(Operand.BOOLEAN) for boolean 3(Operand.DATE) for date 4(Operand.TIME) for time 5(Operand.TIMESTAMP) for timestamp

Parameter

public Parameter(quadbase.common.util.IQueryInParam param)
Allocates a new Parameter Object with a IQueryInParam specifying options

Method Detail

getName

public java.lang.String getName()
Gets the Name of the Parameter


isMapToColumn

public boolean isMapToColumn()
internal use only


setMapToColumn

public void setMapToColumn(boolean state)
internal use only


getMapColIdx

public int getMapColIdx()
internal use only


setMapColIdx

public void setMapColIdx(int idx)
internal use only


getPromptText

public java.lang.String getPromptText()
internal use only


setPromptText

public void setPromptText(java.lang.String s)
internal use only


getDefaultValue

public java.lang.Object getDefaultValue()
Gets the default value of the Parameter. The default value is the value that shows up initially when the user is prompted to enter a parameter.


setDefaultValue

public void setDefaultValue(java.lang.Object value)
Sets the default value of the Parameter. The default value is the value that shows up initially when the user is prompted to enter a parameter.

Parameters:
value - the default value

getFormulaNames

public java.util.Vector<java.lang.String> getFormulaNames()
internal use only


setFormulaNames

public void setFormulaNames(java.util.Vector<java.lang.String> names)
internal use only


removeFormula

public void removeFormula(java.lang.String formulaName)
internal use only


addFormula

public void addFormula(java.lang.String formulaName)
internal use only


isUsedBy

public boolean isUsedBy(java.lang.String formulaName)
internal use only


clone

public static Parameter clone(Parameter _param)
internal use only


copy

public void copy(Parameter _param)
internal use only


setValues

public void setValues(java.util.Vector values)

getValues

public java.util.Vector getValues()

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)
Sets the value of the parameter. The value is essentially what the user inputs, and is different from the default value.

Parameters:
value - the value of this parameter

getValue

public java.lang.Object getValue(ReportTable table,
                                 int index,
                                 int page,
                                 int section,
                                 int totalpages,
                                 int totalsections,
                                 quadbase.reportdesigner.report.Report r,
                                 ReportCell cell,
                                 java.lang.Object dataobj)
                          throws java.lang.Exception
Gets the value of the parameter. The value is essentially what the user inputs, and is different from the default value.

Throws:
java.lang.Exception

getValue

public java.lang.Object getValue(ReportTable table,
                                 int index,
                                 int page,
                                 int section,
                                 int totalpages,
                                 int totalsections,
                                 quadbase.reportdesigner.report.Report r,
                                 ReportCell cell,
                                 java.lang.Object dataobj,
                                 java.util.Vector preAggCol,
                                 java.util.Vector resultCol)
                          throws java.lang.Exception
internal use only

Throws:
java.lang.Exception

getValue

public java.lang.Object getValue(ReportTable table,
                                 int index,
                                 int page,
                                 int section,
                                 int totalpages,
                                 int totalsections,
                                 quadbase.reportdesigner.report.Report r,
                                 ReportCell cell,
                                 java.lang.Object dataobj,
                                 boolean secondRound)
                          throws java.lang.Exception
internal use only

Specified by:
getValue in class quadbase.reportdesigner.report.Operand
Throws:
java.lang.Exception

getValue

public java.lang.Object getValue(ReportTable table,
                                 int index,
                                 int page,
                                 int section,
                                 int totalpages,
                                 int totalsections,
                                 quadbase.reportdesigner.report.Report r,
                                 ReportCell cell,
                                 java.lang.Object dataobj,
                                 boolean secondRound,
                                 java.util.Vector preAggCol,
                                 java.util.Vector resultCol)
                          throws java.lang.Exception
internal use only

Specified by:
getValue in class quadbase.reportdesigner.report.Operand
Throws:
java.lang.Exception

getValue

public java.lang.Object getValue(ReportTable table,
                                 int index,
                                 int page,
                                 int section,
                                 int totalpages,
                                 int totalsections,
                                 quadbase.reportdesigner.report.Report r,
                                 ReportCell cell,
                                 java.lang.Object dataobj,
                                 boolean secondRound,
                                 java.util.Vector preAggCol,
                                 java.util.Vector resultCol,
                                 quadbase.reportdesigner.report.ColData[] colData)
                          throws java.lang.Exception
internal use only

Specified by:
getValue in class quadbase.reportdesigner.report.Operand
Throws:
java.lang.Exception

toString

public java.lang.String toString()
internal use only

Overrides:
toString in class java.lang.Object

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
internal use only

Throws:
java.io.IOException

write

public void write(java.io.DataOutput out,
                  boolean saveValue)
           throws java.io.IOException
Throws:
java.io.IOException

read

public void read(java.io.DataInput in,
                 int version)
          throws java.lang.Exception
internal use only

Throws:
java.lang.Exception

writeShareInfo

public void writeShareInfo(java.io.DataOutput out)
                    throws java.io.IOException
internal use only

Throws:
java.io.IOException

readShareInfo

public void readShareInfo(java.io.DataInput in,
                          int version)
                   throws java.lang.Exception
internal use only

Throws:
java.lang.Exception

writeXMLShareInfo

public void writeXMLShareInfo(java.io.Writer out)
                       throws java.lang.Exception
Throws:
java.lang.Exception

readXMLShareInfo

public void readXMLShareInfo(org.w3c.dom.Node node,
                             int version)
                      throws java.lang.Exception
Throws:
java.lang.Exception

writeXML

public void writeXML(java.io.Writer out)
              throws java.lang.Exception
internal use only

Throws:
java.lang.Exception

readXML

public void readXML(org.w3c.dom.Node node,
                    int version)
             throws java.lang.Exception
internal use only

Throws:
java.lang.Exception

makeDefaultValueFromText

public java.lang.Object makeDefaultValueFromText(java.lang.String text)
internal use only


getValueFromText

public java.lang.Object getValueFromText(java.lang.String text)
internal use only


formatDefaultValue

public java.lang.String formatDefaultValue()
internal use only


formatValue

public java.lang.String formatValue()
internal use only


isInitialized

public boolean isInitialized()
internal use only


isMultiValueParam

public boolean isMultiValueParam()

setMultiValueParam

public void setMultiValueParam(boolean b)

isQueryParamValuesProvider

public boolean isQueryParamValuesProvider()

setQueryParamValuesProvider

public void setQueryParamValuesProvider(boolean b)

getSelectionChoices

public java.util.Vector getSelectionChoices()

setSelectionChoices

public void setSelectionChoices(java.util.Vector vec)

getSqlSelect

public java.lang.String getSqlSelect()

setSqlSelect

public void setSqlSelect(java.lang.String s)

getDefaultSql

public java.lang.String getDefaultSql()

setDefaultSql

public void setDefaultSql(java.lang.String s)

getTableName

public java.lang.String getTableName()

setTableName

public void setTableName(java.lang.String tName)

getColumnName

public java.lang.String getColumnName()

setColumnName

public void setColumnName(java.lang.String tName)

isShared

public boolean isShared()

setShared

public void setShared(boolean b)

getSharedReportName

public java.lang.String getSharedReportName()

setSharedReportName

public void setSharedReportName(java.lang.String s)

getSharedParamName

public java.lang.String getSharedParamName()

setSharedParamName

public void setSharedParamName(java.lang.String s)

getReferenceDegree

public int getReferenceDegree()

setReferenceDegree

public void setReferenceDegree(int i)

incReferenceDegree

public void incReferenceDegree()

decReferenceDegree

public void decReferenceDegree()

isShareReferenced

public boolean isShareReferenced()

isCustomDateFormat

public boolean isCustomDateFormat()

getDateFormat

public java.lang.String getDateFormat()

getQueryFileInfo

public quadbase.common.util.IQueryFileInfo getQueryFileInfo()

setQueryFileInfo

public void setQueryFileInfo(quadbase.common.util.IQueryFileInfo qf)

getReport

public quadbase.reportdesigner.report.Report getReport()

setReport

public void setReport(quadbase.reportdesigner.report.Report r)

getReportTitle

public java.lang.String getReportTitle()

setReportTitle

public void setReportTitle(java.lang.String s)

setSQLType

public void setSQLType(int type)

getSQLType

public int getSQLType()
Overrides:
getSQLType in class quadbase.reportdesigner.report.Operand

getDefaultValueVariable

public quadbase.common.formula.Formula getDefaultValueVariable()

setDefaultValueVariable

public void setDefaultValueVariable(quadbase.common.formula.Formula formula)

getValueVariable

public quadbase.common.formula.Formula getValueVariable()

setValueVariable

public void setValueVariable(quadbase.common.formula.Formula formula)

isAllOptionEnabled

public boolean isAllOptionEnabled()

setAllOptionEnabled

public void setAllOptionEnabled(boolean isAllOptionEnabled)

getAllOptionLabel

public java.lang.String getAllOptionLabel()

setAllOptionLabel

public void setAllOptionLabel(java.lang.String allOptionLabel)

getDatatype

public int getDatatype(quadbase.reportdesigner.report.Report report)
Overrides:
getDatatype in class quadbase.reportdesigner.report.Operand

EspressReport 6.6