Class ComputedColumnHandle


public class ComputedColumnHandle extends StructureHandle
Represents the handle of computed column. A computed column is a 'virtual' column produced as an expression of other columns within the data set. It includes the column name and the expression used to define a computed column.
  • Constructor Details

    • ComputedColumnHandle

      public ComputedColumnHandle(SimpleValueHandle valueHandle, int index)
      Constructs the handle of computed column.
      Parameters:
      valueHandle - the value handle for computed column list of one property
      index - the position of this computed column in the list
  • Method Details

    • getColumnName

      @Deprecated public String getColumnName()
      Deprecated.
      using getName() instead.
      Returns the column name.
      Returns:
      the column name
    • getDisplayName

      public String getDisplayName()
      Returns column display name.
      Returns:
      column display name.
    • getDisplayNameID

      public String getDisplayNameID()
      Gets column display name id.
      Returns:
      column display name id.
    • setDisplayNameID

      public void setDisplayNameID(String displayNameID) throws SemanticException
      Sets column display name id.
      Parameters:
      displayNameID - the column display name id.
      Throws:
      SemanticException
    • getDisplayText

      public String getDisplayText()
      Returns the localized text for the computed column. If the localized text for the text resource key is found, it will be returned. Otherwise, the static text will be returned.
      Returns:
      the localized display name.
    • getName

      public String getName()
      Returns the column name.
      Returns:
      the column name
    • setColumnName

      @Deprecated public void setColumnName(String columnName)
      Deprecated.
      using setName(String) instead.
      Sets the column name.
      Parameters:
      columnName - the column name to set
    • setDisplayName

      public void setDisplayName(String columnDisplayName) throws SemanticException
      Sets the column display name.
      Parameters:
      columnDisplayName - the column display name to set.
      Throws:
      SemanticException - if the new column display name duplicates with the existed ones.
    • setName

      public void setName(String columnName) throws SemanticException
      Sets the column name.
      Parameters:
      columnName - the column name to set.
      Throws:
      SemanticException - if the new column name duplicates with the existed ones.
    • getExpression

      public String getExpression()
      Returns the expression used to define this computed column.
      Returns:
      the expression used to define this computed column
    • setExpression

      public void setExpression(String expression) throws SemanticException
      Sets the expression used to define this computed column.
      Parameters:
      expression - the expression to set
      Throws:
      SemanticException - value required exception
    • getAggregrateOn

      @Deprecated public String getAggregrateOn()
      Deprecated.
      Returns the aggregateOn expression used to define this computed column.
      Returns:
      the aggregateOn expression used to define this computed column
    • setAggregrateOn

      @Deprecated public void setAggregrateOn(String aggregateOn)
      Deprecated.
      Sets the aggregateOn expression used to define this computed column.
      Parameters:
      aggregateOn - the aggregateOn expression to set
    • getDataType

      public String getDataType()
      Returns the data type of this column. The possible values are defined in DesignChoiceConstants, and they are:
      • COLUMN_DATA_TYPE_ANY
      • COLUMN_DATA_TYPE_INTEGER
      • COLUMN_DATA_TYPE_STRING
      • COLUMN_DATA_TYPE_DATETIME
      • COLUMN_DATA_TYPE_DECIMAL
      • COLUMN_DATA_TYPE_FLOAT
      • COLUMN_DATA_TYPE_STRUCTURE
      • COLUMN_DATA_TYPE_TABLE
      Returns:
      the data type of this column.
    • setDataType

      public void setDataType(String dataType) throws SemanticException
      Sets the data type of this column. The allowed values are defined in DesignChoiceConstants, and they are:
      • COLUMN_DATA_TYPE_ANY
      • COLUMN_DATA_TYPE_INTEGER
      • COLUMN_DATA_TYPE_STRING
      • COLUMN_DATA_TYPE_DATETIME
      • COLUMN_DATA_TYPE_DECIMAL
      • COLUMN_DATA_TYPE_FLOAT
      • COLUMN_DATA_TYPE_STRUCTURE
      • COLUMN_DATA_TYPE_TABLE
      Parameters:
      dataType - the data type to set
      Throws:
      SemanticException - if the dataType is not in the choice list.
    • addAggregateOn

      public void addAggregateOn(String aggreValue) throws SemanticException
      Adds an aggregate level to the list.
      Parameters:
      aggreValue - the aggregate name. For listing elements, this can be "All" or the name of a single group.
      Throws:
      SemanticException
    • addArgument

      public AggregationArgumentHandle addArgument(AggregationArgument argument) throws SemanticException
      Adds an arguments to list.
      Parameters:
      argument - the aggregate function argument
      Returns:
      aggregation argument handle.
      Throws:
      SemanticException
    • getAggregateFunction

      public String getAggregateFunction()
      Returns the expression used to define this computed column. The function is one of following values:
      • DesignChoiceConstants.MEASURE_FUNCTION_SUM
      • DesignChoiceConstants.MEASURE_FUNCTION_COUNT
      • DesignChoiceConstants.MEASURE_FUNCTION_MIN
      • DesignChoiceConstants.MEASURE_FUNCTION_MAX
      Returns:
      the expression used to define this computed column
    • getAggregateOn

      public String getAggregateOn()
      Returns the aggregateOn expression used to define this computed column.
      Returns:
      the aggregateOn expression used to define this computed column
    • getAggregateOnList

      public List getAggregateOnList()
      Returns the list containing levels to be aggregated on.
      Returns:
      the list containing levels to be aggregated on
    • argumentsIterator

      public Iterator argumentsIterator()
      Returns additional arguments to the aggregate function. Each item in the list is instance of AggregationArgumentHandle.
      Returns:
      a list containing additional arguments
    • getFilterExpression

      public String getFilterExpression()
      Returns the expression used to define this computed column.
      Returns:
      the expression used to define this computed column
    • removeAggregateOn

      public void removeAggregateOn(String aggreValue) throws SemanticException
      Removes an aggregate level from the list.
      Parameters:
      aggreValue - the aggregate name. For listing elements, this can be "All" or the name of a single group.
      Throws:
      SemanticException
    • removeArgument

      public void removeArgument(AggregationArgument argument) throws SemanticException
      Removes an arguments from list.
      Parameters:
      argument - the aggregate function argument
      Throws:
      SemanticException
    • setAggregateFunction

      public void setAggregateFunction(String expression) throws SemanticException
      Sets the expression used to define this computed column. The function is one of following values:
      • DesignChoiceConstants.MEASURE_FUNCTION_SUM
      • DesignChoiceConstants.MEASURE_FUNCTION_COUNT
      • DesignChoiceConstants.MEASURE_FUNCTION_MIN
      • DesignChoiceConstants.MEASURE_FUNCTION_MAX
      Parameters:
      expression - the expression to set
      Throws:
      SemanticException - if the expression is not one of above values.
    • setAggregateOn

      public void setAggregateOn(String aggregateOn)
      Sets the aggregateOn expression used to define this computed column.
      Parameters:
      aggregateOn - the aggregateOn expression to set
    • setFilterExpression

      public void setFilterExpression(String expression) throws SemanticException
      Sets the expression used to define this computed column.
      Parameters:
      expression - the expression to set
      Throws:
      SemanticException - value required exception
    • clearAggregateOnList

      public void clearAggregateOnList() throws SemanticException
      Clears the aggregate on list.
      Throws:
      SemanticException
    • clearArgumentList

      public void clearArgumentList() throws SemanticException
      Clears the argument list.
      Throws:
      SemanticException
    • allowExport

      public boolean allowExport()
      Gets the flag which indicates whether the computed column supports export.
      Returns:
      true if it allows, otherwise false.
    • setAllowExport

      public void setAllowExport(boolean allowExport) throws SemanticException
      Sets the flag which indicates whether the computed column supports export.
      Parameters:
      allowExport - the flag to set
      Throws:
      SemanticException
    • setCalculationType

      public void setCalculationType(String calculationType) throws SemanticException
      Gets the calculation function name. The value is defined by customer DB calculation executor.
      Parameters:
      calculationType -
      Throws:
      SemanticException
    • getCalculationType

      public String getCalculationType()
      Gets the calculation function name. The value is defined by customer DB calculation executor.
      Returns:
    • calculationArgumentsIterator

      public Iterator calculationArgumentsIterator()
      Returns a iterator of calculation arguments for specific calculation type. Each item in the list is instance of CalculationAggregationArgumentHandle.
      Returns:
      a list containing calculation arguments
    • addCalculationArgument

      public CalculationArgumentHandle addCalculationArgument(CalculationArgument argument) throws SemanticException
      Adds a calculation argument to list.
      Parameters:
      argument - the calculation argument for specific calculation type
      Returns:
      calculation argument handle.
      Throws:
      SemanticException
    • removeCalculationArgument

      public void removeCalculationArgument(CalculationArgument argument) throws SemanticException
      Removes a calculation argument from list.
      Parameters:
      argument - the calculation argument
      Throws:
      SemanticException
    • setReferenceDateType

      public void setReferenceDateType(String refDateType) throws SemanticException
      Sets reference date type for the calculation in this column. The type is one of following values:
      • DesignChoiceConstants.REFERENCE_DATE_TYPE_TODAY
      • DesignChoiceConstants.REFERENCE_DATE_TYPE_FIXED_DATE
      • DesignChoiceConstants.REFERENCE_DATE_TYPE_ENDING_DATE_IN_DIMENSION
      Parameters:
      refDateType - the reference date type to set
      Throws:
      SemanticException - if the refDateType is not one of above values.
    • getReferenceDateType

      public String getReferenceDateType()
      Returns reference date type for the calculation in this column. The type is one of following values:
      • DesignChoiceConstants.REFERENCE_DATE_TYPE_TODAY
      • DesignChoiceConstants.REFERENCE_DATE_TYPE_FIXED_DATE
      • DesignChoiceConstants.REFERENCE_DATE_TYPE_ENDING_DATE_IN_DIMENSION
      Returns:
      the reference date type
    • getReferenceDateValue

      public ExpressionHandle getReferenceDateValue()
      Gets the expression handle for the reference date value member. Then use the returned handle to do get/set action.
      Returns:
    • getTimeDimension

      public String getTimeDimension()
      Gets the time dimension string value. It is the name of the referenced time dimension.
      Returns:
      the referred time dimension name
    • setTimeDimension

      public void setTimeDimension(String timeDimension) throws SemanticException
      Sets the time dimension string value. It is the name of the referred time dimension element.
      Parameters:
      timeDimension -
      Throws:
      SemanticException