Enum Class AggregationLevels
- All Implemented Interfaces:
Serializable,Comparable<AggregationLevels>,java.lang.constant.Constable
CopperMeasureToAggregateAbove will be aggregated if any of the
defined levels are present or if all are expressed.
An example would be the following : We have some simulation data generated along scenarios, where records are given both scenarionId and and a scenarioName :
┌─────────┬────────┬──────┐ │ scenId │ ScName │ data │ ├─────────┼────────┼──────┤ │ 1 │ "A" │ 10. │ │ 1 │ "A" │ 10. │ │ 1 │ "A" │ -5. │ │ 2 │ "B" │ 20. │ │ 2 │ "B" │ -10 │ └─────────┴────────┴──────┘
Let's consider the folLowing measure:
Copper.sum("data")
.per(Copper.Level("ScenId"),Copper.Level("ScName"))
.doNotAggregateAbove(AggregationLevels mask)
The value of mask will determine up to which level data.SUM will be aggregated.- Author:
- ActiveViam
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionProperty determining the aggregation behaviour of thecurrent measureas follows :Property determining the aggregation behavior of thecurrent measureas follows : -
Method Summary
Modifier and TypeMethodDescriptionstatic AggregationLevelsReturns the enum constant of this class with the specified name.static AggregationLevels[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ANY
Property determining the aggregation behavior of thecurrent measureas follows :The measure will be aggregated until one level from the list of requested
CopperLevelin the previousCopperMeasure.per(CopperLevel...)call is expressed in the query.In other words, the aggregation will stop along a hierarchy when more than one level from both the latter hierarchy and the list of requested levels are present in the queried location.
Considering the example from
AggregationLevelsCopper.sum("data") .per(Copper.Level("ScenId"), Copper.Level("ScName")) .doNotAggregateAbove(AggregationLevels.ANY)will be not be aggregated at the expressed location if ANY of the hierarchies is queried above the levels defined in theper()call:┌─────────┬────────┬──────────┐ │ scenId │ ScName │ data.SUM │ ├─────────┼────────┼──────────┤ │ (ALL) │ │ │ │ │ "A" │ 15. │ │ │ "B" │ 10. │ │ 1 │ (ALL) │ │ │ │ "A" │ 15. │ │ │ "B" │ 10. │ │ 2 │ (ALL) │ │ │ │ "A" │ 15. │ │ │ "B" │ 10. │ └─────────┴────────┴──────────┘
-
ALL
Property determining the aggregation behaviour of thecurrent measureas follows :The measure will be aggregated until all level from the list of requested
CopperLevelin the previousCopperMeasure.per(CopperLevel...)call is expressed in the query.In other words, the aggregation will only stop along a hierarchy when all levels from both the latter hierarchy and the list of requested levels are present in the queried location.
Considering the example from
AggregationLevelsCopper.sum("data") .per(Copper.Level("ScenId"), Copper.Level("ScName")) .doNotAggregateAbove(AggregationLevels.ALL)will be not be aggregated at the expressed location if ALL of the hierarchies are queried above the levels defined in theper()call:┌─────────┬────────┬──────────┐ │ scenId │ ScName │ data.SUM │ ├─────────┼────────┼──────────┤ │ (ALL) │ │ │ │ │ "A" │ 15. │ │ │ "B" │ 10. │ │ 1 │ (ALL) │ 15. │ │ │ "A" │ 15. │ │ │ "B" │ 10. │ │ 2 │ (ALL) │ 10. │ │ │ "A" │ 15. │ │ │ "B" │ 10. │ └─────────┴────────┴──────────┘
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-