Class Expression<O extends ObjectIdentity>

Object
ObjectIdentity
BacklinkBuilder<O>
Expression<O>
Type Parameters:
O - the type of the measure or axis this Expression belongs to

public class Expression<O extends ObjectIdentity> extends BacklinkBuilder<O>
Builder for computing a chart measure or axis from a Datamart Expression instead of a plain field, obtained from AbstractChartMeasures.withExpression(), AbstractChartMeasures.withBoxplotExpression(), AggrFieldAxis.withExpression(), or NonAggrFieldAxis.withExpression() rather than instantiated directly.
  • Field Summary

    Fields inherited from class BacklinkBuilder

    METHOD_BACK

    Fields inherited from class ObjectIdentity

    classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity
  • Constructor Summary

    Constructors
    Constructor
    Description
    Expression(O backLink, String instanceId, String classId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Sets the value substituted for this Datamart Expression's result whenever the expression evaluates to null, for example for a row with no matching data.
    setDescription(String description)
    Sets a description for this Expression.
    setExpression(String expression)
    Sets the Datamart Expression this measure or axis is computed from.

    Methods inherited from class BacklinkBuilder

    back, getParent

    Methods inherited from class ObjectIdentity

    addInvocation, addInvocation, addInvocationInternal, getClassId

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Expression

      public Expression(O backLink, String instanceId, String classId)
  • Method Details

    • setExpression

      public Expression<O> setExpression(String expression)
      Sets the Datamart Expression this measure or axis is computed from. The argument is the expression text itself, written as a Datamart query expression, not the name of a stored expression, for example SUM(if(InvoiceDateYear="2015", NetMargin, 0)) / SUM(Volume).
      Parameters:
      expression - the Datamart Expression, written as a Datamart query expression
      Returns:
      this Expression builder, for chaining further configuration
      See Also:
    • setDefaultValue

      public Expression<O> setDefaultValue(BigDecimal defaultValue)
      Sets the value substituted for this Datamart Expression's result whenever the expression evaluates to null, for example for a row with no matching data.
      Parameters:
      defaultValue - the value to use in place of a null result
      Returns:
      this Expression builder, for chaining further configuration
    • setDescription

      public Expression<O> setDescription(String description)
      Sets a description for this Expression. When this builder was obtained from an additional measure, by AbstractChartMeasures.withExpression() or AbstractChartMeasures.withBoxplotExpression(), a non-empty description also sets that measure's own label to the same text; when obtained from an axis, by AggrFieldAxis.withExpression() or NonAggrFieldAxis.withExpression(), it does not.
      Parameters:
      description - the description to set for this Expression
      Returns:
      this Expression builder, for chaining further configuration
      See Also: