Class ScenarioBuilder
java.lang.Object
com.onenetwork.platform.data.scenario.ScenarioBuilder
public abstract class ScenarioBuilder
extends java.lang.Object
Base class for building scenario baseline data from "real" data, and building scenario data from baseline data
-
Constructor Summary
Constructors Constructor Description ScenarioBuilder(Scenario s)
-
Method Summary
Modifier and Type Method Description void
createBaselineData()
Called by clients to replicate data from "real" to baseline.void
createScenarioFromBaseline(Scenario baselineScenario)
Automatically replicates all data from the baseline scenario into Scenario s.void
purge()
Purge all data related to the given scenario.protected void
replicate(com.onenetwork.platform.data.model.impl.ModelLevelType modelLevelType, java.util.List<java.lang.Long> ids)
Given a model type and list of ids, replicates those from their original location into a scenario.abstract void
replicateRealToBaseline()
Concrete subclasses should implement this method to choose the data they want replicated from "real" to baseline scenario data Implementor MUST make sure to replicate in a suitable order, i.e.
-
Constructor Details
-
Method Details
-
replicateRealToBaseline
public abstract void replicateRealToBaseline()Concrete subclasses should implement this method to choose the data they want replicated from "real" to baseline scenario data Implementor MUST make sure to replicate in a suitable order, i.e. Orgs before Sites, etc -
createBaselineData
public void createBaselineData()Called by clients to replicate data from "real" to baseline. Internally, calls replicateRealToBaseline -
createScenarioFromBaseline
Automatically replicates all data from the baseline scenario into Scenario s.- Parameters:
baselineScenario
- baseline scenario
-
purge
public void purge()Purge all data related to the given scenario. -
replicate
protected void replicate(com.onenetwork.platform.data.model.impl.ModelLevelType modelLevelType, java.util.List<java.lang.Long> ids)Given a model type and list of ids, replicates those from their original location into a scenario. To be used by module impls of replicateRealToBaseline()
-