Package com.activeviam.builders
Class SimplePreAggregatedMeasureBuilder
java.lang.Object
com.activeviam.builders.SimplePreAggregatedMeasureBuilder
- All Implemented Interfaces:
ICanStartBuildingDimensions,ICanStartBuildingQueryCube,ICanHaveFolder<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>,ICanHaveFormatter<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>,ICanHaveMeasureGroup<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>,ICanHaveProperty<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>,ICanHide<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>,ICanStartBuildingMeasures,ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder,ICanStartBuildingMeasures.IPreAggregatedMeasureBuilder,ICanStartBuildingMeasures.IPreAggregatedMeasureBuilderWithField,ICubeDescriptionBuilder.INamedCubeDescriptionBuilder,IHasAtLeastOneMeasure
public class SimplePreAggregatedMeasureBuilder
extends Object
implements ICanStartBuildingMeasures.IPreAggregatedMeasureBuilder, ICanStartBuildingMeasures.IPreAggregatedMeasureBuilderWithField, ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.activeviam.desc.build.dimensions.ICanStartBuildingDimensions
ICanStartBuildingDimensions.DimensionsAdderNested classes/interfaces inherited from interface com.activeviam.desc.build.ICanStartBuildingMeasures
ICanStartBuildingMeasures.BuildablePostProcessorBuilder, ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder, ICanStartBuildingMeasures.INativeMeasureBuilder, ICanStartBuildingMeasures.IPostProcessorBuilder, ICanStartBuildingMeasures.IPreAggregatedMeasureBuilder, ICanStartBuildingMeasures.IPreAggregatedMeasureBuilderWithField -
Constructor Summary
ConstructorsConstructorDescriptionSimplePreAggregatedMeasureBuilder(Function<IAggregatedMeasureDescription, IHasAtLeastOneMeasure> resultConsumer) Constructor for build start.SimplePreAggregatedMeasureBuilder(Function<IAggregatedMeasureDescription, IHasAtLeastOneMeasure> resultConsumer, BaseMeasureBuilder base, String field, String aggregationFunction, Properties properties) Constructor for build iterations. -
Method Summary
Modifier and TypeMethodDescriptionStarts creating a query cube on top of the existing description.isVisible(boolean visibility) Changes the visibility of this item.Starts building a pre-aggregated measure.withAggregatedMeasure(IBasicAggregatedMeasureDescription description) Adds the description for a measure.withAggregationFunction(String aggregationFunctionPluginKey) Chooses the aggregation function.withCalculations(Consumer<ICopperContext> calculations) Adds multiple measures and hierarchies via the Copper API.Starts customizing theIMeasureHierarchy.COUNT_IDnative measure.withDimension(String name) Start building a dimension.Integrates the dimensions built by a separate function.Chooses the field to aggregate.withFormatter(String formatter) Sets the formatter of the component.withinFolder(String folder) Sets the folder of the component.withMeasureGroups(String... groups) Sets the measure group of the component.Change the name of the measure.withPostProcessor(IPostProcessorDescription description) Adds the description for a post-processor.withPostProcessor(String name) Adds the description for a post-processor.withProperty(String key, String value) Puts a property to initialize the component.Starts customizing theIMeasureHierarchy.TIMESTAMP_IDnative measure.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.activeviam.desc.build.dimensions.ICanStartBuildingDimensions
withSingleLevelDimension, withSingleLevelDimensions, withSingleLevelDimensionsMethods inherited from interface com.activeviam.desc.build.ICanStartBuildingMeasures
withMeasuresMethods inherited from interface com.activeviam.desc.build.ICanStartBuildingMeasures.IPreAggregatedMeasureBuilder
avg, max, min, sum
-
Constructor Details
-
SimplePreAggregatedMeasureBuilder
public SimplePreAggregatedMeasureBuilder(Function<IAggregatedMeasureDescription, IHasAtLeastOneMeasure> resultConsumer) Constructor for build start.- Parameters:
resultConsumer- The result consumer.
-
SimplePreAggregatedMeasureBuilder
public SimplePreAggregatedMeasureBuilder(Function<IAggregatedMeasureDescription, IHasAtLeastOneMeasure> resultConsumer, BaseMeasureBuilder base, String field, String aggregationFunction, Properties properties) Constructor for build iterations.- Parameters:
resultConsumer- The result consumer.base- The base attributes holder.field- The field to be used by the measure.aggregationFunction- The aggregation function to be used by the measure.properties- The properties to be used by the measure.
-
-
Method Details
-
withField
Description copied from interface:ICanStartBuildingMeasures.IPreAggregatedMeasureBuilderChooses the field to aggregate.- Specified by:
withFieldin interfaceICanStartBuildingMeasures.IPreAggregatedMeasureBuilder- Parameters:
field- The field to aggregate.- Returns:
- The builder for chained calls.
-
withAggregationFunction
public ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder withAggregationFunction(String aggregationFunctionPluginKey) Description copied from interface:ICanStartBuildingMeasures.IPreAggregatedMeasureBuilderWithFieldChooses the aggregation function.- Specified by:
withAggregationFunctionin interfaceICanStartBuildingMeasures.IPreAggregatedMeasureBuilderWithField- Parameters:
aggregationFunctionPluginKey- The aggregation function plugin key.- Returns:
- The builder for chained calls.
-
withProperty
public ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder withProperty(String key, String value) Description copied from interface:ICanHavePropertyPuts a property to initialize the component.- Specified by:
withPropertyin interfaceICanHaveProperty<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>- Parameters:
key- The property key.value- The property value.- Returns:
- this builder for chaining.
-
isVisible
Description copied from interface:ICanHideChanges the visibility of this item.- Specified by:
isVisiblein interfaceICanHide<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>- Parameters:
visibility- The new visibility of the item.- Returns:
- The builder for chained calls.
-
withinFolder
Description copied from interface:ICanHaveFolderSets the folder of the component.- Specified by:
withinFolderin interfaceICanHaveFolder<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>- Parameters:
folder- The folder name.- Returns:
- The builder for chained calls.
-
withMeasureGroups
public ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder withMeasureGroups(String... groups) throws IllegalArgumentException Description copied from interface:ICanHaveMeasureGroupSets the measure group of the component.- Specified by:
withMeasureGroupsin interfaceICanHaveMeasureGroup<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>- Parameters:
groups- The measure group to use. They should not contain the ',' character since this is the separator used between multiple measure groups enforced by XMLA.- Returns:
- The builder for chained calls.
- Throws:
IllegalArgumentException- If one of the measure groups contains a comma.
-
withFormatter
public ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder withFormatter(String formatter) Description copied from interface:ICanHaveFormatterSets the formatter of the component.- Specified by:
withFormatterin interfaceICanHaveFormatter<ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder>- Parameters:
formatter- The formatter plugin key.- Returns:
- The builder for chained calls.
-
withName
Description copied from interface:ICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilderChange the name of the measure.- Specified by:
withNamein interfaceICanStartBuildingMeasures.ICanBuildPreAggregatedMeasureBuilder- Parameters:
name- The new name of the measure.- Returns:
- The builder for chained calls.
-
withContributorsCount
Description copied from interface:ICanStartBuildingMeasuresStarts customizing theIMeasureHierarchy.COUNT_IDnative measure.- Specified by:
withContributorsCountin interfaceICanStartBuildingMeasures- Returns:
- The native measure customization builder.
-
withUpdateTimestamp
Description copied from interface:ICanStartBuildingMeasuresStarts customizing theIMeasureHierarchy.TIMESTAMP_IDnative measure.- Specified by:
withUpdateTimestampin interfaceICanStartBuildingMeasures- Returns:
- The native measure customization builder.
-
withAggregatedMeasure
Description copied from interface:ICanStartBuildingMeasuresStarts building a pre-aggregated measure.- Specified by:
withAggregatedMeasurein interfaceICanStartBuildingMeasures- Returns:
- The pre-aggregated measure builder.
-
withAggregatedMeasure
Description copied from interface:ICanStartBuildingMeasuresAdds the description for a measure.- Specified by:
withAggregatedMeasurein interfaceICanStartBuildingMeasures- Parameters:
description- The description of the measure.- Returns:
- this builder for chaining.
-
withPostProcessor
Description copied from interface:ICanStartBuildingMeasuresAdds the description for a post-processor.- Specified by:
withPostProcessorin interfaceICanStartBuildingMeasures- Parameters:
name- The name of the post-processor.- Returns:
- builder for the post-processor description.
-
withPostProcessor
Description copied from interface:ICanStartBuildingMeasuresAdds the description for a post-processor.- Specified by:
withPostProcessorin interfaceICanStartBuildingMeasures- Parameters:
description- The description of the post-processor.- Returns:
- this builder for chaining.
-
withCalculations
Description copied from interface:ICanStartBuildingMeasuresAdds multiple measures and hierarchies via the Copper API.- Specified by:
withCalculationsin interfaceICanStartBuildingMeasures- Parameters:
calculations- the measure and hierarchy creation function- Returns:
- The builder for chained calls.
-
withDimension
Description copied from interface:ICanStartBuildingDimensionsStart building a dimension.- Specified by:
withDimensionin interfaceICanStartBuildingDimensions- Parameters:
name- The dimension name.- Returns:
- The dimension builder.
-
withDimensions
public ICanBuildCubeDescription<IActivePivotInstanceDescription> withDimensions(ICanStartBuildingDimensions.DimensionsAdder adder) Description copied from interface:ICanStartBuildingDimensionsIntegrates the dimensions built by a separate function.- Specified by:
withDimensionsin interfaceICanStartBuildingDimensions- Parameters:
adder- The function adding the dimensions.- Returns:
- The builder having integrated the function changes.
-
asQueryCube
Description copied from interface:ICanStartBuildingQueryCubeStarts creating a query cube on top of the existing description.- Specified by:
asQueryCubein interfaceICanStartBuildingQueryCube- Returns:
- The builder for chained calls.
-