Package com.activeviam.builders
Class SimpleCubeDescriptionBuilder<DescriptionT>
java.lang.Object
com.activeviam.builders.SimpleCubeDescriptionBuilder<DescriptionT>
- Type Parameters:
DescriptionT- SeeICubeDescriptionBuilder.
- All Implemented Interfaces:
ICanHaveFactFilter,ICanStartBuildingEpochDimension<DescriptionT>,ICanStartBuildingDataCube,ICanAddSharedContextValue<DescriptionT>,ICanBuildCommonCubeDescription<DescriptionT>,ICanBuildCubeDescription<DescriptionT>,ICanStartBuildingAggregateProvider<DescriptionT>,ICubeDescriptionBuilder
public class SimpleCubeDescriptionBuilder<DescriptionT>
extends Object
implements ICubeDescriptionBuilder, ICanBuildCubeDescription<DescriptionT>
Simple implementation of
ICubeDescriptionBuilder.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.activeviam.desc.build.ICanBuildCommonCubeDescription
ICanBuildCommonCubeDescription.IAggregationProceduresBuilderNested classes/interfaces inherited from interface com.activeviam.desc.build.ICubeDescriptionBuilder
ICubeDescriptionBuilder.INamedCubeDescriptionBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default value forIActivePivotDescription.isAutoFactlessHierarchies()in the produced description.static final IDimension.DimensionTypeThe default value forIAxisDimensionDescription.getDimensionType().static final StringThe default value forIHierarchyDescription.getFolder()andIMeasureMemberDescription.getFolder().static final StringThe default value forIAxisLevelDescription.getFormatter().static final ILevelInfo.LevelTypeThe default value forIAxisLevelDescription.getLevelType().static final StringThe default value forIAxisDimensionDescription.getMeasureGroups()andIMeasureMemberDescription.getGroup().static final ImmutableList<IPropertyInfo>The default value forIAxisLevelDescription.getMemberProperties().static final ImmutableMap<String,Object> The default properties of built items.static final booleanThe default value used to computeIHierarchyDescription.isAllMembersEnabled().static final booleanThe default virtual value for a hierarchy.static final booleanThe default visibility of built items. -
Constructor Summary
ConstructorsConstructorDescriptionSimpleCubeDescriptionBuilder(Function<IActivePivotInstanceDescription, DescriptionT> resultConsumer) Constructor for build start. -
Method Summary
Modifier and TypeMethodDescriptionaddAggregationProcedure(IAnalysisAggregationProcedureDescription aggregationProcedure) Adds the description of anIAnalysisAggregationProcedureDescriptionto the cube description.addDimension(IAxisDimensionDescription description) Adds the description for a dimension.Starts converting this cube to a data cube.build()Builds the cube description.static voidensureNoDuplicateName(ImmutableCollection<String> names, String itemErrorPrefix, String parentToString) Ensure that all the names in a given collection are unique within this collection by throwing otherwise.static StringjoinMeasureGroups(String... values) Concatenate multiple measure group names in a single string using the standard XMLA separator between them.Starts building the aggregate provider description.withAggregateProvider(IAggregateProviderDefinition definition) Provide directly an aggregate provider description for this cube.Starts building theIAggregatesCachedescription.Starts building theIAggregatesContinuousQueryEnginedescription.withAggregationProcedures(Function<ICanBuildCommonCubeDescription.IAggregationProceduresBuilder, ICanBuildCommonCubeDescription.IAggregationProceduresBuilder> builderConsumer) Defines aggregation procedures on the cube.withDefaultMeasures(String... defaultMeasures) Chooses the default measures of this cube.withDimension(String name) Starts building a dimension.Integrates the dimensions built by a separate function.Starts building theIDrillthroughExecutordescription.Enables the epoch dimension for this cube and starts customizing it.withEpochDimension(IEpochDimensionDescription newEpochDimension) Changes the epoch dimension description to use in the cube.withFilter(ICondition condition) Defines thefilter conditionfor the cube.Gives a name to the cube to build.Disables auto-factless hierarchies for this cube.Starts building theIActivePivotQueryExecutordescription.<NewDescriptionT>
SimpleCubeDescriptionBuilder<NewDescriptionT>withResultConsumer(Function<DescriptionT, NewDescriptionT> newResultConsumer) Changes our result consumer by chaining a new one.Adds a shared context value to the current cube description.withSharedContextValues(IContextValue... values) Adds a collection of shared context values to the cube description being currently built.ICanStartBuildingDrillthroughProperties.IDrillthroughPropertiesBuilder<ICanBuildCubeDescription<DescriptionT>>Begins defining thedrillthrough properties.Begins defining themdx context.Begins definingsub cube properties.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.activeviam.desc.build.ICanAddSharedContextValue
withSharedContextValueMethods inherited from interface com.activeviam.desc.build.ICanBuildCommonCubeDescription
withDefaultMeasureMethods inherited from interface com.activeviam.desc.build.dimensions.ICanHaveFactFilter
withFilter
-
Field Details
-
DEFAULT_AUTO_FACTLESS_HIERARCHIES
public static final boolean DEFAULT_AUTO_FACTLESS_HIERARCHIESThe default value forIActivePivotDescription.isAutoFactlessHierarchies()in the produced description.- See Also:
-
DEFAULT_SLICING
public static final boolean DEFAULT_SLICINGThe default value used to computeIHierarchyDescription.isAllMembersEnabled().- See Also:
-
DEFAULT_VIRTUAL
public static final boolean DEFAULT_VIRTUALThe default virtual value for a hierarchy.- See Also:
-
DEFAULT_VISIBILITY
public static final boolean DEFAULT_VISIBILITYThe default visibility of built items.- See Also:
-
DEFAULT_MEASURE_GROUPS
The default value forIAxisDimensionDescription.getMeasureGroups()andIMeasureMemberDescription.getGroup(). -
DEFAULT_FOLDER
The default value forIHierarchyDescription.getFolder()andIMeasureMemberDescription.getFolder(). -
DEFAULT_LEVEL_FORMATTER
The default value forIAxisLevelDescription.getFormatter(). -
DEFAULT_DIMENSION_TYPE
The default value forIAxisDimensionDescription.getDimensionType(). -
DEFAULT_LEVEL_TYPE
The default value forIAxisLevelDescription.getLevelType(). -
DEFAULT_MEMBER_PROPERTIES
The default value forIAxisLevelDescription.getMemberProperties(). -
DEFAULT_PROPERTIES
The default properties of built items.
-
-
Constructor Details
-
SimpleCubeDescriptionBuilder
public SimpleCubeDescriptionBuilder(Function<IActivePivotInstanceDescription, DescriptionT> resultConsumer) Constructor for build start.- Parameters:
resultConsumer- The function processing the builtIActivePivotInstanceDescriptiononbuild().
-
-
Method Details
-
withResultConsumer
public <NewDescriptionT> SimpleCubeDescriptionBuilder<NewDescriptionT> withResultConsumer(Function<DescriptionT, NewDescriptionT> newResultConsumer) Changes our result consumer by chaining a new one.- Type Parameters:
NewDescriptionT- The return type of the new result consumer.- Parameters:
newResultConsumer- The new result consumer to chain to our.- Returns:
- The new builder taking into account the new result consumer.
-
withDimension
Starts building a dimension.- Parameters:
name- The name of the dimension.- Returns:
- The dimension builder.
-
withDimensions
public ICanBuildCubeDescription<IActivePivotInstanceDescription> withDimensions(ICanStartBuildingDimensions.DimensionsAdder adder) Integrates the dimensions built by a separate function.- Parameters:
adder- The function adding the dimensions.- Returns:
- The builder having integrated the function changes.
-
withEpochDimension
Description copied from interface:ICanStartBuildingEpochDimensionEnables the epoch dimension for this cube and starts customizing it.- Specified by:
withEpochDimensionin interfaceICanStartBuildingEpochDimension<DescriptionT>- Returns:
- The builder to start customizing the epoch dimension.
-
withEpochDimension
public SimpleCubeDescriptionBuilder<DescriptionT> withEpochDimension(IEpochDimensionDescription newEpochDimension) Changes the epoch dimension description to use in the cube.- Parameters:
newEpochDimension- The epoch dimension description.- Returns:
- The builder for chained calls.
-
addAggregationProcedure
public SimpleCubeDescriptionBuilder<DescriptionT> addAggregationProcedure(IAnalysisAggregationProcedureDescription aggregationProcedure) Adds the description of anIAnalysisAggregationProcedureDescriptionto the cube description.- Parameters:
aggregationProcedure- procedure description- Returns:
- the updated builder
-
withAggregationProcedures
public ICanBuildCommonCubeDescription<DescriptionT> withAggregationProcedures(Function<ICanBuildCommonCubeDescription.IAggregationProceduresBuilder, ICanBuildCommonCubeDescription.IAggregationProceduresBuilder> builderConsumer) Description copied from interface:ICanBuildCommonCubeDescriptionDefines aggregation procedures on the cube.Aggregation procedures offer means to support aggregated measures on analysis hierarchies.
- Specified by:
withAggregationProceduresin interfaceICanBuildCommonCubeDescription<DescriptionT>- Parameters:
builderConsumer- consumer of the builder to define the procedures- Returns:
- The builder for chained calls
-
addDimension
public SimpleCubeDescriptionBuilder<DescriptionT> addDimension(IAxisDimensionDescription description) Adds the description for a dimension.- Parameters:
description- The description of the dimension.- Returns:
- The builder for chained calls.
-
withAggregatesCache
public IAggregatesCacheDescriptionCompleteBuilder.AggregatesCacheDescriptionBuilder<DescriptionT> withAggregatesCache()Description copied from interface:ICanBuildCommonCubeDescriptionStarts building theIAggregatesCachedescription.- Specified by:
withAggregatesCachein interfaceICanBuildCommonCubeDescription<DescriptionT>- Returns:
- The builder for the aggregates cache.
-
asDataCube
Starts converting this cube to a data cube.- Specified by:
asDataCubein interfaceICanStartBuildingDataCube- Returns:
- The data cube builder.
-
withName
Description copied from interface:ICubeDescriptionBuilderGives a name to the cube to build.- Specified by:
withNamein interfaceICubeDescriptionBuilder- Parameters:
newId- The cube name, a.k.a. id, a.k.a. pivotId.- Returns:
- The builder for chained calls.
-
build
Description copied from interface:ICanBuildCommonCubeDescriptionBuilds the cube description.- Specified by:
buildin interfaceICanBuildCommonCubeDescription<DescriptionT>- Returns:
- the cube description.
-
withAggregateProvider
public IBuildableAggregateProviderDescriptionBuilder.AggregateProviderBuilder<DescriptionT> withAggregateProvider()Description copied from interface:ICanStartBuildingAggregateProviderStarts building the aggregate provider description.- Specified by:
withAggregateProviderin interfaceICanStartBuildingAggregateProvider<DescriptionT>- Returns:
- The aggregate provider description builder.
-
withAggregateProvider
public SimpleCubeDescriptionBuilder<DescriptionT> withAggregateProvider(IAggregateProviderDefinition definition) Description copied from interface:ICanStartBuildingAggregateProviderProvide directly an aggregate provider description for this cube.- Specified by:
withAggregateProviderin interfaceICanStartBuildingAggregateProvider<DescriptionT>- Parameters:
definition- The aggregate provider definition.- Returns:
- The cube builder.
-
withDrillthroughExecutor
Description copied from interface:ICanBuildCommonCubeDescriptionStarts building theIDrillthroughExecutordescription.- Specified by:
withDrillthroughExecutorin interfaceICanBuildCommonCubeDescription<DescriptionT>- Returns:
- The builder for the drillthrough executor description.
-
withQueryExecutor
Description copied from interface:ICanBuildCommonCubeDescriptionStarts building theIActivePivotQueryExecutordescription.- Specified by:
withQueryExecutorin interfaceICanBuildCommonCubeDescription<DescriptionT>- Returns:
- The builder for the query executor description.
-
withAggregatesContinuousQueryEngine
public IPluginDescriptionBuilder<ICanBuildCubeDescription<DescriptionT>> withAggregatesContinuousQueryEngine()Description copied from interface:ICanBuildCommonCubeDescriptionStarts building theIAggregatesContinuousQueryEnginedescription.- Specified by:
withAggregatesContinuousQueryEnginein interfaceICanBuildCommonCubeDescription<DescriptionT>- Returns:
- The builder for the aggregates continuous query engine description.
-
withoutAutoFactlessHierarchies
Description copied from interface:ICanBuildCubeDescriptionDisables auto-factless hierarchies for this cube.- Specified by:
withoutAutoFactlessHierarchiesin interfaceICanBuildCubeDescription<DescriptionT>- Returns:
- The builder for chained calls.
-
withFilter
Description copied from interface:ICanHaveFactFilterDefines thefilter conditionfor the cube.- Specified by:
withFilterin interfaceICanHaveFactFilter- Parameters:
condition- The condition of the filter.- Returns:
- The cube builder for chaining.
-
withDefaultMeasures
Description copied from interface:ICanBuildCommonCubeDescriptionChooses the default measures of this cube.- Specified by:
withDefaultMeasuresin interfaceICanBuildCommonCubeDescription<DescriptionT>- Parameters:
defaultMeasures- The default measures.- Returns:
- The builder for chained calls.
- See Also:
-
ensureNoDuplicateName
public static void ensureNoDuplicateName(ImmutableCollection<String> names, String itemErrorPrefix, String parentToString) throws IllegalArgumentException Ensure that all the names in a given collection are unique within this collection by throwing otherwise.- Parameters:
names- The collection holding the names that should be unique.itemErrorPrefix- The prefix used in front of the failing name in the thrown exception message.parentToString- The description of the parent within which unicity is checked, given in the thrown exception message.- Throws:
IllegalArgumentException- If the unicity constraint is not verified.
-
joinMeasureGroups
Concatenate multiple measure group names in a single string using the standard XMLA separator between them.- Parameters:
values- The groups to concatenate. These strings should not contain any comma.- Returns:
- The groups joined representation.
-