Class AsOfDateNeighbourValuePostProcessor<O>

  • Type Parameters:
    O - the output type
    All Implemented Interfaces:
    com.quartetfs.biz.pivot.postprocessing.IAggregatedMeasureAware, com.quartetfs.biz.pivot.postprocessing.IPartitionedPostProcessor<O>, com.quartetfs.biz.pivot.postprocessing.IPostProcessor<O>, com.quartetfs.fwk.types.IExtendedPluginValue, Serializable

    @QuartetExtendedPluginValue(intf=com.quartetfs.biz.pivot.postprocessing.IPostProcessor.class,
                                key="AsOfDateNeighbourValuePostProcessor")
    public class AsOfDateNeighbourValuePostProcessor<O>
    extends com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor<O>
    implements com.quartetfs.biz.pivot.postprocessing.IPartitionedPostProcessor<O>
    Extension of the NeighborValuePostProcessor which uses an IDayToDayDifference context value to select the AsOfDate to shift to. If the context value has not been set the standard NeighborValuePostProcessor behaviour is used.

    Note: this post-processor assumes the time hierarchy provided is a slicing hierarchy with one level.
    Author:
    ActiveViam
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  AsOfDateNeighbourValuePostProcessor.NeighborValuePrefetcherWithoutFilter  
      • Nested classes/interfaces inherited from class com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor

        com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor.NeighborValuePrefetcher
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String PLUGIN_KEY  
      static String USE_D2D_PROPERTY  
      protected boolean useD2D  
      • Fields inherited from class com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor

        DIRECTION_PROPERTY, isPrevious, STREAM_MEASURE_PROPERTY, streamMeasureName, TIME_HIERARCHY_PROPERTY, timeHierarchy, timeHierarchyIdx
      • Fields inherited from class com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor

        aggregatedMeasureName, ANALYSIS_LEVELS_PROPERTY, analysisLevelsToExpand, continuousQueryHandlerKeys, derivedContextDependencies, evaluator, EVALUATOR, explicitContextDependencies, logger, measuresProvider, name, OUTPUT_TYPE, outputType, pivot, prefetchers, PRINT_TIMINGS, printTimings, properties, underlyingMeasures
      • Fields inherited from interface com.quartetfs.biz.pivot.postprocessing.IPartitionedPostProcessor

        DEFAULT_PARTITIONING_ON_RANGE_LEVELS
      • Fields inherited from interface com.quartetfs.biz.pivot.postprocessing.IPostProcessor

        CONTINUOUS_QUERY_HANDLER_KEYS, IS_PARTITIONED_ON_RANGE_LEVELS_PROPERTY, SEPARATOR, UNDERLYING_MEASURES
    • Constructor Summary

      Constructors 
      Constructor Description
      AsOfDateNeighbourValuePostProcessor​(String name, com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Function<com.activeviam.desc.build.ICanStartBuildingMeasures,​com.activeviam.desc.build.IHasAtLeastOneMeasure> getPostProcessorDescription​(String measureName, String underlyingMeasure, String direction, boolean useD2D, String hierarchy, String formatter, String folder)  
      void init​(Properties properties)  
      static com.activeviam.copper.api.CopperMeasure measure​(String underlyingMeasure, String hierarchy)
      This PP will take change the date of the metric.
      static com.activeviam.copper.api.CopperMeasure measure​(String underlyingMeasure, String direction, boolean useD2D, String hierarchy)
      This PP will take change the date of the metric.
      void reduce​(com.quartetfs.biz.pivot.ILocation location, List<com.quartetfs.biz.pivot.cellset.IAggregatesRetrievalResult> partialResults, com.quartetfs.biz.pivot.cellset.IPostProcessedRetrievalResultWriter writer)  
      com.quartetfs.biz.pivot.cube.hierarchy.axis.IAxisMember retrieveNeighbor​(com.quartetfs.biz.pivot.ILocation location, boolean isPrevious)  
      void setPartitioningLevels​(com.quartetfs.biz.pivot.ILocation location, Collection<com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo> partitioningLevels)  
      protected com.quartetfs.biz.pivot.context.subcube.ICubeFilter shiftFilter​(com.quartetfs.biz.pivot.context.subcube.ICubeFilter filter)
      This is the filtering to be used when shifting
      • Methods inherited from class com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor

        compute, computeNeighborLocation, findNext, findPrevious, getType, hardExpandLocation, searchAmongNext, searchAmongNext, searchAmongPrevious, searchAmongPrevious, tryGoDownToLevelAndFindFirst, tryGoDownToLevelAndFindLast
      • Methods inherited from class com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor

        addContextDependency, checkInterruption, checkOutputType, computeNamePath, computeOutputType, createEvaluator, expandResult, getActivePivot, getContext, getContextDependencies, getContinuousQueryHandlerKeys, getCurrentMeasure, getDatastoreVersion, getDerivedContextDependencies, getExpansionProcedure, getGenericOutputType, getMeasuresProvider, getName, getOutputType, getOutputTypeFromGenericClassParameter, getOutputTypeFromProperties, getPrefetchers, getProperties, getQueryCache, getTypeFromClass, handleCircularDependency, handleNotSupportedAnalysisLevels, handleUnknownUnderlyingMeasure, hideEvaluator, initializeContinuousQueryHandlerKeys, initializeUnderlyingMeasures, removeAnalysisLevelsFromFilter, restrictLocationAnalysisLevels, retrieveAnalysisLevelsToExpand, retrieveNamedPrefetchAggregatesWithAnalysisLevels, retrievePrefetchAggregates, retrievePrefetchAggregatesWithAnalysisLevels, setAggregatedMeasureName, supportsAnalysisLevels, toString
      • Methods inherited from interface com.quartetfs.fwk.types.IExtendedPluginValue

        getType
      • Methods inherited from interface com.quartetfs.biz.pivot.postprocessing.IPostProcessor

        compute, getContextDependencies, getContinuousQueryHandlerKeys, getName, getOutputType, getPrefetchers, getProperties
    • Constructor Detail

      • AsOfDateNeighbourValuePostProcessor

        public AsOfDateNeighbourValuePostProcessor​(String name,
                                                   com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)
    • Method Detail

      • getPostProcessorDescription

        public static Function<com.activeviam.desc.build.ICanStartBuildingMeasures,​com.activeviam.desc.build.IHasAtLeastOneMeasure> getPostProcessorDescription​(String measureName,
                                                                                                                                                                      String underlyingMeasure,
                                                                                                                                                                      String direction,
                                                                                                                                                                      boolean useD2D,
                                                                                                                                                                      String hierarchy,
                                                                                                                                                                      String formatter,
                                                                                                                                                                      String folder)
      • measure

        public static com.activeviam.copper.api.CopperMeasure measure​(String underlyingMeasure,
                                                                      String hierarchy)
        This PP will take change the date of the metric. If DayToDayDifference is expressed it will use it, or else it will slice over the hierarchy
        Parameters:
        underlyingMeasure - The measure to change
        hierarchy - The date hierarchy
        Returns:
        The measure at the specified date
      • measure

        public static com.activeviam.copper.api.CopperMeasure measure​(String underlyingMeasure,
                                                                      String direction,
                                                                      boolean useD2D,
                                                                      String hierarchy)
        This PP will take change the date of the metric.

        Note: for reverse-sorted date hierarchy, "next" is previous date, and "previous" is next date.

        Parameters:
        underlyingMeasure - The measure to change
        direction - "next" or "previous"
        useD2D - flag to specify whether the day-to-day measure is used
        hierarchy - The date hierarchy
        Returns:
        The measure at the specified date
      • init

        public void init​(Properties properties)
                  throws com.quartetfs.fwk.QuartetException
        Specified by:
        init in interface com.quartetfs.biz.pivot.postprocessing.IPostProcessor<O>
        Overrides:
        init in class com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor<O>
        Throws:
        com.quartetfs.fwk.QuartetException
      • setPartitioningLevels

        public void setPartitioningLevels​(com.quartetfs.biz.pivot.ILocation location,
                                          Collection<com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo> partitioningLevels)
        Specified by:
        setPartitioningLevels in interface com.quartetfs.biz.pivot.postprocessing.IPartitionedPostProcessor<O>
        Specified by:
        setPartitioningLevels in interface com.quartetfs.biz.pivot.postprocessing.IPostProcessor<O>
      • reduce

        public void reduce​(com.quartetfs.biz.pivot.ILocation location,
                           List<com.quartetfs.biz.pivot.cellset.IAggregatesRetrievalResult> partialResults,
                           com.quartetfs.biz.pivot.cellset.IPostProcessedRetrievalResultWriter writer)
        Specified by:
        reduce in interface com.quartetfs.biz.pivot.postprocessing.IPartitionedPostProcessor<O>
      • shiftFilter

        protected com.quartetfs.biz.pivot.context.subcube.ICubeFilter shiftFilter​(com.quartetfs.biz.pivot.context.subcube.ICubeFilter filter)
        This is the filtering to be used when shifting
        Parameters:
        filter - The actual filter
        Returns:
        The new filter
      • retrieveNeighbor

        public com.quartetfs.biz.pivot.cube.hierarchy.axis.IAxisMember retrieveNeighbor​(com.quartetfs.biz.pivot.ILocation location,
                                                                                        boolean isPrevious)
        Overrides:
        retrieveNeighbor in class com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor<O>