public class EvaluationLevelUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
attachEvaluation(ModelInstance modelInstance,
ModelInstance detachedModelInstance)
Attaches an evaluation data stored in the detached model instance to the
regular model instance.
|
static String |
baseLevel()
Returns base level.
|
static void |
cleanDataOfEvaluationLevel(ModelProvider modelProvider,
ModelInstance modelInstance,
String level)
Cleans all entities that belongs to the evaluation level.
|
static void |
cleanDataOfLevelAndSublevels(ModelProvider modelProvider,
ModelInstance modelInstance,
String level)
Cleans all entities that belongs to the evaluation level and its sub-levels.
|
static Set<String> |
findCommonSuperlevels(Set<String> evaluationLevels)
Find common super-level.
|
static Set<String> |
findLowestLevels(Set<String> evaluationLevels)
Returns set of lowest levels.
|
static boolean |
isBaseLevel(String evaluationLevel)
Returns true if it is base level.
|
static boolean |
isSublevel(String level,
String sublevel)
Returns true if the second level is sub-level of the first level.
|
static boolean |
isThisLevelOrSublevel(String level,
String sublevel)
Returns true if the second level is equal to or is sub-level of the first level.
|
static Collection<String> |
levelHierarchy(String level)
Returns collection containing level and all lower levels up to base level.
|
static String |
lowerLevel(String level)
Returns previous lower level.
|
static String |
nextSublevel(String level,
ModelInstance modelInstance)
Returns next unused sub-level for the model instance.
|
static void |
removeDataFromLevelAndSublevels(ModelInstance modelInstance,
String level)
Removes all entities that belongs to the evaluation level and its sub-levels.
|
static void |
removeDataOfEvaluationLevel(ModelInstance modelInstance,
String level)
Removes all entities that belongs to the evaluation level.
|
static int |
segmentsNumber(String level)
Returns number of segments in level.
|
static void |
sort(List<EvaluationLevelAware> list,
boolean lowerFirst)
Sort evaluation level aware entities according to number of level segments.
|
static void |
sortLevels(List<String> levels)
Sort evaluation levels according to number of level segments.
|
static void |
synchronize(ModelInstance original,
ModelInstance toBeSynchronized)
Synchronize model instance with original.
|
static String |
temporaryEvaluationLevel()
Returns debug level.
|
public static String baseLevel()
public static String temporaryEvaluationLevel()
public static String lowerLevel(String level)
level
- public static Collection<String> levelHierarchy(String level)
level
- public static boolean isBaseLevel(String evaluationLevel)
evaluationLevel
- public static boolean isSublevel(String level, String sublevel)
level
- sublevel
- public static boolean isThisLevelOrSublevel(String level, String sublevel)
level
- sublevel
- public static void attachEvaluation(ModelInstance modelInstance, ModelInstance detachedModelInstance)
modelInstance
- detachedModelInstance
- public static void synchronize(ModelInstance original, ModelInstance toBeSynchronized)
original
- toBeSynchronized
- public static String nextSublevel(String level, ModelInstance modelInstance)
level
- modelInstance
- public static void cleanDataOfEvaluationLevel(ModelProvider modelProvider, ModelInstance modelInstance, String level)
modelProvider
- modelInstance
- level
- public static void cleanDataOfLevelAndSublevels(ModelProvider modelProvider, ModelInstance modelInstance, String level)
modelProvider
- modelInstance
- level
- public static void removeDataOfEvaluationLevel(ModelInstance modelInstance, String level)
modelInstance
- level
- public static void removeDataFromLevelAndSublevels(ModelInstance modelInstance, String level)
modelInstance
- level
- public static Set<String> findCommonSuperlevels(Set<String> evaluationLevels)
evaluationLevels
- public static Set<String> findLowestLevels(Set<String> evaluationLevels)
evaluationLevels
- public static int segmentsNumber(String level)
level
- public static void sort(List<EvaluationLevelAware> list, boolean lowerFirst)
list
- lowerFirst
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.