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_BACKFields inherited from class ObjectIdentity
classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetDefaultValue(BigDecimal defaultValue) Sets the value substituted for this Datamart Expression's result whenever the expression evaluates tonull, 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, getParentMethods inherited from class ObjectIdentity
addInvocation, addInvocation, addInvocationInternal, getClassId
-
Constructor Details
-
Expression
-
-
Method Details
-
setExpression
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 exampleSUM(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
Sets the value substituted for this Datamart Expression's result whenever the expression evaluates tonull, for example for a row with no matching data.- Parameters:
defaultValue- the value to use in place of anullresult- Returns:
- this Expression builder, for chaining further configuration
-
setDescription
Sets a description for this Expression. When this builder was obtained from an additional measure, byAbstractChartMeasures.withExpression()orAbstractChartMeasures.withBoxplotExpression(), a non-empty description also sets that measure's ownlabelto the same text; when obtained from an axis, byAggrFieldAxis.withExpression()orNonAggrFieldAxis.withExpression(), it does not.- Parameters:
description- the description to set for this Expression- Returns:
- this Expression builder, for chaining further configuration
- See Also:
-