MeasureBuilderBase
Home > @gooddata/sdk-model > MeasureBuilderBase
MeasureBuilderBase class
Abstract base class for measure builders. Measure builders allow for incremental, fluent construction and modification of measures.
Signature:
export declare abstract class MeasureBuilderBase<T extends IMeasureDefinitionType>
Remarks
You should not be instantiating the builders directly. Instead, rely on the different functions to create different types of measures.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the MeasureBuilderBase
class.
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
alias | (alias?: string | undefined) => this | Sets alias - alternative title - for the measure. | |
build | () => IMeasure<T> | ||
customLocalId | boolean | ||
defaultFormat | () => this | Resets format string to the server-defined value. | |
defaultLocalId | () => this | Indicates that the measure's localId should be generated using the default local-id generator logic. | |
format | (format?: string | undefined) => this | Sets measure format to use when rendering values calculated from this measure. | |
localId | (localId?: Identifier | undefined) => this | Sets local identifier (localId) for the measure. LocalId can be used to reference the measure within the execution definition. | |
noAlias | () => this | Resets alias - alternative title - set for the measure. | |
noTitle | () => this | Resets alternative title for the measure. The server-defined title of the measure will be used instead. | |
title | (title?: string | undefined) => this | Sets alternative title for the measure. |
Methods
Method | Modifiers | Description |
---|---|---|
buildDefinition() | Build of measure definition is responsibility of the subclass. | |
generateLocalId() | Generation of local identifier is a responsibility shared with the the subclass - so that the concrete builders can use their concrete definition to provide additional parts of the local id. | |
initializeFromExisting(measure) | The measure builder subclasses must call this when they are used to modify an existing measure. Existing measure modification returns a new object that reflects the mods however it keeps the localId set as-is. |