class ModelUpdateUtils
extends java.lang.Object
| Constructor and Description |
|---|
ModelUpdateUtils() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static <M extends IModel> |
addReplacing(M old,
M model)
Adds a pair of original and replacing model into a new mapping structure.
|
(package private) static <M extends IModel> |
addReplacing(M old,
M model,
java.util.Map<M,M> result)
Adds a pair of original and replacing model into a new mapping structure.
|
(package private) static <M extends IModel> |
collectImporting(java.util.List<M> models,
java.util.Map<M,M> replacing)
Collects all importing models.
|
(package private) static <M extends IModel> |
determineUpdateSeqence(M model,
java.util.Map<M,java.util.List<M>> using)
Determines the update sequence for
model based on the importing models in using. |
private static <M extends IModel> |
followImporting(M model,
java.util.Map<M,java.util.List<M>> using,
java.util.Map<M,java.lang.Integer> sequence,
int start,
java.util.Set<M> done)
Recursively follows the importing models provided by
using from model
and enumerates them from start. |
static <M extends IModel> java.util.Map<M,M> addReplacing(M old, M model)
M - the model typeold - the old modelmodel - the replacing modelold and modelstatic <M extends IModel> java.util.Map<M,M> addReplacing(M old, M model, java.util.Map<M,M> result)
M - the model typeold - the old modelmodel - the replacing modelresult - the mapping structure before adding, may be null then a new one is createdold and modelstatic <M extends IModel> java.util.Map<M,java.util.List<M>> collectImporting(java.util.List<M> models, java.util.Map<M,M> replacing)
M - the type of modelmodels - the models to be consideredreplacing - optional mapping of old and new models in case of updates (result will contain new models
rather than old ones mentioned in the mapping), may be nullstatic <M extends IModel> java.util.List<M> determineUpdateSeqence(M model, java.util.Map<M,java.util.List<M>> using)
model based on the importing models in using.
This method follows all imports and gives the imported model a sequence number. Revisited models receive
a higher number in order to be later in sequence.M - the type of modelmodel - the model to determine the update sequence forusing - the actual importing modelsprivate static <M extends IModel> int followImporting(M model, java.util.Map<M,java.util.List<M>> using, java.util.Map<M,java.lang.Integer> sequence, int start, java.util.Set<M> done)
using from model
and enumerates them from start. Revisited models receive a higher number and, thus,
will be later in the update sequence.M - the type of modelmodel - the model to start the recursive traversalusing - the actual importing modelssequence - the importing models and their assigned sequence numberstart - the start sequence numberdone - already processed models - cycle preventionCopyright © 2009 - 2018 SSE. All Rights Reserved.