Class AsOfDateNeighbourValuePostProcessor<O>
- java.lang.Object
-
- com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor<OutputType>
-
- com.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor<O>
-
- com.activeviam.risk.core.postprocessor.impl.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 theNeighborValuePostProcessor
which uses anIDayToDayDifference
context value to select the AsOfDate to shift to. If the context value has not been set the standardNeighborValuePostProcessor
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
-
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
-
-
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
-
-
-
-
Field Detail
-
PLUGIN_KEY
public static final String PLUGIN_KEY
- See Also:
- Constant Field Values
-
USE_D2D_PROPERTY
public static final String USE_D2D_PROPERTY
- See Also:
- Constant Field Values
-
useD2D
protected boolean useD2D
-
-
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 changehierarchy
- 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 changedirection
- "next" or "previous"useD2D
- flag to specify whether the day-to-day measure is usedhierarchy
- The date hierarchy- Returns:
- The measure at the specified date
-
init
public void init(Properties properties) throws com.quartetfs.fwk.QuartetException
-
setPartitioningLevels
public void setPartitioningLevels(com.quartetfs.biz.pivot.ILocation location, Collection<com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo> partitioningLevels)
-
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 interfacecom.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 classcom.quartetfs.biz.pivot.postprocessing.impl.NeighborValuePostProcessor<O>
-
-