Class ContextUtils

java.lang.Object
com.activeviam.copper.ContextUtils

@Deprecated(since="6.0.6", forRemoval=true) public class ContextUtils extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Utility class for the Copper context.
  • Constructor Details

    • ContextUtils

      public ContextUtils()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getInternal

      public static IInternalCopperMeasure getInternal(CopperMeasure measure)
      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

      public static IInternalCopperContext getInternal(ICopperContext context)
      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

      public static boolean shouldBePublished(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. 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

      public static <K> K getTypedMeasureOrNull(IInternalCopperMeasure measure, Class<K> klazz)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Tries to cast an IInternalCopperMeasure into a given type of IInternalCopperMeasure or 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 description
      addedDimensions - 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 given CopperMeasure as underlying measures.
      Parameters:
      context - the context
      underlyings - 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 given CopperMeasure as underlying measures.
      Parameters:
      context - the context
      underlyings - 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 given CopperMeasure as 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 given newType is authorized.
      Parameters:
      currentType - The current type of the column.
      newType - The target type which results in forbidden conversion.