Package com.activeviam.copper
Class ContextUtils
java.lang.Object
com.activeviam.copper.ContextUtils
Deprecated, for removal: This API element is subject to removal in a future version.
Utility class for the Copper context.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiescreatePropertiesFromUnderlying(IInternalCopperContext context, IInternalCopperMeasure... underlyings) Deprecated, for removal: This API element is subject to removal in a future version.Creates the properties required for a measure when it has the givenCopperMeasureas underlying measures.static PropertiescreatePropertiesFromUnderlying(IInternalCopperContext context, Collection<IInternalCopperMeasure> underlyings) Deprecated, for removal: This API element is subject to removal in a future version.Creates the properties required for a measure when it has the givenCopperMeasureas underlying measures.static PropertiesDeprecated, for removal: This API element is subject to removal in a future version.Creates the properties required for a measure when it has the givenCopperMeasureas underlying measures.static IInternalCopperMeasuregetInternal(CopperMeasure measure) Deprecated, for removal: This API element is subject to removal in a future version.Returns the internal version of the given measure.static IInternalCopperContextgetInternal(ICopperContext context) Deprecated, for removal: This API element is subject to removal in a future version.Returns the internal version of the given context.static <K> KgetTypedMeasureOrNull(IInternalCopperMeasure measure, Class<K> klazz) Deprecated, for removal: This API element is subject to removal in a future version.Tries to cast anIInternalCopperMeasureinto a given type ofIInternalCopperMeasureor returns null if this is not possible.static List<IAxisDimensionDescription>mergeHierarchyDescriptionsAndCheckConflicts(List<IAxisDimensionDescription> dimensions, List<IAxisDimensionDescription> addedDimensions) Deprecated, for removal: This API element is subject to removal in a future version.Merges the hierarchy descriptions from the cube description and the hierarchies brought by Copper.static List<IMeasureMemberDescription>mergeMeasureDescription(List<INativeMeasureDescription> nativeMeasures, List<IAggregatedMeasureDescription> aggregatedMeasures, List<IAdvancedAggregatedMeasureDescription> advancedAggregatedMeasures, List<IPostProcessorDescription> postProcessors, List<IMeasureMemberDescription> addedMeasuresDescription) Deprecated, for removal: This API element is subject to removal in a future version.Merges the measure descriptions from the cube description and the calculation and checks for naming conflicts.static booleanshouldBePublished(IInternalCopperMeasure measure) Deprecated, for removal: This API element is subject to removal in a future version.Checks if a measure needs to end in the cube.static voidverifyAuthorizedTypeConversion(int currentType, int newType) Deprecated, for removal: This API element is subject to removal in a future version.Verifies that the measure can be casted to the givennewTypeis authorized.
-
Constructor Details
-
ContextUtils
public ContextUtils()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getInternal
Deprecated, for removal: This API element is subject to removal in a future version.Returns the internal version of the given measure.- Parameters:
measure- the measure- Returns:
- the internal version of the measure
-
getInternal
Deprecated, for removal: This API element is subject to removal in a future version.Returns the internal version of the given context.- Parameters:
context- the context- Returns:
- the internal version of the context
-
shouldBePublished
Deprecated, for removal: This API element is subject to removal in a future version.Checks if a measure needs to end in the cube. If false is returned, it means some optimizations might be applied when publishing a measure which has this one as dependency that could lead not not publishing this one in cube.The criteria is: The user (explicitly) sets the visibility to true. If the visibility has been left untouched, it may not be exported.
- Parameters:
measure- the measure to check.- Returns:
- true if it should end in the cube, false otherwise.
-
getTypedMeasureOrNull
Deprecated, for removal: This API element is subject to removal in a future version.Tries to cast anIInternalCopperMeasureinto a given type ofIInternalCopperMeasureor returns null if this is not possible.- Type Parameters:
K- The type into which the cast will be attempted.- Parameters:
measure- The measure to try to cast.klazz- The class representing the type into which the cast will be attempted.- Returns:
- The casted measure if successful or null.
-
mergeHierarchyDescriptionsAndCheckConflicts
public static List<IAxisDimensionDescription> mergeHierarchyDescriptionsAndCheckConflicts(List<IAxisDimensionDescription> dimensions, List<IAxisDimensionDescription> addedDimensions) Deprecated, for removal: This API element is subject to removal in a future version.Merges the hierarchy descriptions from the cube description and the hierarchies brought by Copper.- Parameters:
dimensions- The dimensions from the cube descriptionaddedDimensions- The dimensions from the calculation- Returns:
- the descriptions of dimensions that will be available on the cube.
-
mergeMeasureDescription
public static List<IMeasureMemberDescription> mergeMeasureDescription(List<INativeMeasureDescription> nativeMeasures, List<IAggregatedMeasureDescription> aggregatedMeasures, List<IAdvancedAggregatedMeasureDescription> advancedAggregatedMeasures, List<IPostProcessorDescription> postProcessors, List<IMeasureMemberDescription> addedMeasuresDescription) Deprecated, for removal: This API element is subject to removal in a future version.Merges the measure descriptions from the cube description and the calculation and checks for naming conflicts.- Parameters:
nativeMeasures- The native measures from the cube description.aggregatedMeasures- The aggregated measures from the cube description.advancedAggregatedMeasures- The advanced aggregated measures from the cube description.postProcessors- The postprocessors from the cube description.addedMeasuresDescription- The descriptions from the calculation.- Returns:
- the descriptions of measures that will be available on the cube.
-
createPropertiesFromUnderlying
public static Properties createPropertiesFromUnderlying(IInternalCopperContext context, IInternalCopperMeasure... underlyings) Deprecated, for removal: This API element is subject to removal in a future version.Creates the properties required for a measure when it has the givenCopperMeasureas underlying measures.- Parameters:
context- the contextunderlyings- the underlying measures- Returns:
- The properties to have in this measure.
-
createPropertiesFromUnderlying
public static Properties createPropertiesFromUnderlying(IInternalCopperContext context, Collection<IInternalCopperMeasure> underlyings) Deprecated, for removal: This API element is subject to removal in a future version.Creates the properties required for a measure when it has the givenCopperMeasureas underlying measures.- Parameters:
context- the contextunderlyings- the underlying measures- Returns:
- The properties to have in this measure.
-
createPropertiesFromUnderlying
public static Properties createPropertiesFromUnderlying(Collection<IMeasureMemberDescription> underlyings) Deprecated, for removal: This API element is subject to removal in a future version.Creates the properties required for a measure when it has the givenCopperMeasureas underlying measures.- Parameters:
underlyings- the underlying measures- Returns:
- The properties to have in this measure.
-
verifyAuthorizedTypeConversion
public static void verifyAuthorizedTypeConversion(int currentType, int newType) Deprecated, for removal: This API element is subject to removal in a future version.Verifies that the measure can be casted to the givennewTypeis authorized.- Parameters:
currentType- The current type of the column.newType- The target type which results in forbidden conversion.
-