Class Parameter

java.lang.Object
quadbase.reportdesigner.report.Operand
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.
  • Constructor Details

    • Parameter

      public Parameter()
      Allocates a Parameter Object
    • Parameter

      public Parameter(String name)
      Allocates a Parameter Object with specified name
    • Parameter

      public Parameter(String name, 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 Details

    • getName

      public 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 String getPromptText()
      internal use only
    • setPromptText

      public void setPromptText(String s)
      internal use only
    • getDefaultValue

      public 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(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 Vector<String> getFormulaNames()
      internal use only
    • setFormulaNames

      public void setFormulaNames(Vector<String> names)
      internal use only
    • removeFormula

      public void removeFormula(String formulaName)
      internal use only
    • addFormula

      public void addFormula(String formulaName)
      internal use only
    • isUsedBy

      public boolean isUsedBy(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(Vector values)
    • getValues

      public Vector getValues()
    • getValue

      public Object getValue()
    • setValue

      public void setValue(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 Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, Object dataobj) throws Exception
      Gets the value of the parameter. The value is essentially what the user inputs, and is different from the default value.
      Throws:
      Exception
    • getValue

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

      public Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, Object dataobj, boolean secondRound) throws Exception
      internal use only
      Specified by:
      getValue in class quadbase.reportdesigner.report.Operand
      Throws:
      Exception
    • getValue

      public Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, Object dataobj, boolean secondRound, Vector preAggCol, Vector resultCol) throws Exception
      internal use only
      Specified by:
      getValue in class quadbase.reportdesigner.report.Operand
      Throws:
      Exception
    • getValue

      public Object getValue(ReportTable table, int index, int page, int section, int totalpages, int totalsections, quadbase.reportdesigner.report.Report r, ReportCell cell, Object dataobj, boolean secondRound, Vector preAggCol, Vector resultCol, quadbase.reportdesigner.report.ColData[] colData) throws Exception
      internal use only
      Specified by:
      getValue in class quadbase.reportdesigner.report.Operand
      Throws:
      Exception
    • toString

      public String toString()
      internal use only
      Overrides:
      toString in class Object
    • write

      public void write(DataOutput out) throws IOException
      internal use only
      Throws:
      IOException
    • write

      public void write(DataOutput out, boolean saveValue) throws IOException
      Throws:
      IOException
    • read

      public void read(DataInput in, int version) throws Exception
      internal use only
      Throws:
      Exception
    • writeShareInfo

      public void writeShareInfo(DataOutput out) throws IOException
      internal use only
      Throws:
      IOException
    • readShareInfo

      public void readShareInfo(DataInput in, int version) throws Exception
      internal use only
      Throws:
      Exception
    • writeXMLShareInfo

      public void writeXMLShareInfo(Writer out) throws Exception
      Throws:
      Exception
    • readXMLShareInfo

      public void readXMLShareInfo(Node node, int version) throws Exception
      Throws:
      Exception
    • writeXML

      public void writeXML(Writer out) throws Exception
      internal use only
      Throws:
      Exception
    • readXML

      public void readXML(Node node, int version) throws Exception
      internal use only
      Throws:
      Exception
    • makeDefaultValueFromText

      public Object makeDefaultValueFromText(String text)
      internal use only
    • getValueFromText

      public Object getValueFromText(String text)
      internal use only
    • formatDefaultValue

      public String formatDefaultValue()
      internal use only
    • formatValue

      public 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 Vector getSelectionChoices()
    • setSelectionChoices

      public void setSelectionChoices(Vector vec)
    • getSqlSelect

      public String getSqlSelect()
    • setSqlSelect

      public void setSqlSelect(String s)
    • getDefaultSql

      public String getDefaultSql()
    • setDefaultSql

      public void setDefaultSql(String s)
    • getTableName

      public String getTableName()
    • setTableName

      public void setTableName(String tName)
    • getColumnName

      public String getColumnName()
    • setColumnName

      public void setColumnName(String tName)
    • isShared

      public boolean isShared()
    • setShared

      public void setShared(boolean b)
    • getSharedReportName

      public String getSharedReportName()
    • setSharedReportName

      public void setSharedReportName(String s)
    • getSharedParamName

      public String getSharedParamName()
    • setSharedParamName

      public void setSharedParamName(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 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 String getReportTitle()
    • setReportTitle

      public void setReportTitle(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 String getAllOptionLabel()
    • setAllOptionLabel

      public void setAllOptionLabel(String allOptionLabel)
    • getDatatype

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