Class CostComputationDataCache
java.lang.Object
org.ametys.plugins.odfpilotage.cost.entity.CostComputationDataCache
This class store caches of the CostComputationDataComponent
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCostComputationDataCache
(List<OdfReferenceTableEntry> norms, List<OdfReferenceTableEntry> teachingNatures, OverriddenData overriddenData) The constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_initializeNatureData
(List<OdfReferenceTableEntry> teachingNatures) Retrieve teaching nature values created and initialize informations about them in the cacheprotected void
Retrieve norm values created and initialize informations about them in the cachegetComputedEffectiveCache
(String programItemId) Get a calculated effective from a program item idGet the current stepgetEffectiveMinMaxByNature
(String natureId) Get an effectiveMinMax from a nature idgetEnteredEffectiveCache
(String programItemId) Get an enteredEffective from a program item idgetEqTDByNature
(String natureId) Get an eqTD value from a natureIdGet the norm retrieved by a nature idgetOverriddenEffective
(String programItemId) Get the overridden effective of a program itemgetOverriddenGroups
(String programItemId) Get the overridden number groups of a program itemgetOverriddenVolumeOfHours
(String programItemId, String natureId) Get the overridden volume of hours of a program itemGet a calculated effective from a program itemboolean
normsContainsNatureIdKey
(String normId, String natureId) Check if the norms map contains the nature idboolean
normsContainsNormIdKey
(String normId) Check if the norms map contains the norm idvoid
putComputedEffectiveCache
(String programItemId, Effectives calculatedEffective) Put a calculated effective in the mapvoid
putEffectiveMinMaxByNature
(String natureId, Map<String, Long> effectiveMinMax) Put an effectiveMinMax in the mapvoid
putEnteredEffectiveCache
(String programItemId, Double enteredEffective) Put an entered effective in the mapvoid
putEqTDByNature
(String natureId, Double eqTD) Put an eqTD value in the mapvoid
putNorms
(String normId, Map<String, NormDetails> normValue) Put a norm value in the mapvoid
Put a weight in the mapvoid
setCurrentStep
(Container currentStep) Set the current step
-
Field Details
-
_currentStep
The current step
-
-
Constructor Details
-
CostComputationDataCache
public CostComputationDataCache(List<OdfReferenceTableEntry> norms, List<OdfReferenceTableEntry> teachingNatures, OverriddenData overriddenData) The constructor- Parameters:
norms
- list of normsteachingNatures
- list of teaching naturesoverriddenData
- overridden data by the user
-
-
Method Details
-
_initializeNormData
Retrieve norm values created and initialize informations about them in the cache- Parameters:
norms
- list of norms
-
_initializeNatureData
Retrieve teaching nature values created and initialize informations about them in the cache- Parameters:
teachingNatures
- list of teaching natures
-
getEqTDByNature
Get an eqTD value from a natureId- Parameters:
natureId
- the nature id- Returns:
- the eqTD value
-
putEqTDByNature
Put an eqTD value in the map- Parameters:
natureId
- the nature ideqTD
- the eqTD value
-
getEffectiveMinMaxByNature
Get an effectiveMinMax from a nature id- Parameters:
natureId
- the nature id- Returns:
- the effective min max
-
putEffectiveMinMaxByNature
Put an effectiveMinMax in the map- Parameters:
natureId
- the nature ideffectiveMinMax
- the effective min max
-
getNorms
Get the norm retrieved by a nature id- Parameters:
normId
- the norm idnatureId
- the nature id- Returns:
- the norm
-
normsContainsNormIdKey
Check if the norms map contains the norm id- Parameters:
normId
- the norm id- Returns:
- true if the norms map contains the norm id
-
normsContainsNatureIdKey
Check if the norms map contains the nature id- Parameters:
normId
- the norm idnatureId
- the nature id- Returns:
- true if the norms map contains the nature id
-
putNorms
Put a norm value in the map- Parameters:
normId
- the norm idnormValue
- the value
-
getEnteredEffectiveCache
Get an enteredEffective from a program item id- Parameters:
programItemId
- the program item id- Returns:
- the entered effective
-
putEnteredEffectiveCache
Put an entered effective in the map- Parameters:
programItemId
- the program item identeredEffective
- the entered effective
-
getComputedEffectiveCache
Get a calculated effective from a program item id- Parameters:
programItemId
- the program item id- Returns:
- the calculated effective
-
putComputedEffectiveCache
Put a calculated effective in the map- Parameters:
programItemId
- the program item idcalculatedEffective
- the calculated effective
-
putWeight
Put a weight in the map- Parameters:
programItemPath
- the program item idweight
- the weight
-
getWeight
Get a calculated effective from a program item- Parameters:
programItemPath
- the path of the program item- Returns:
- the calculated effective
-
setCurrentStep
Set the current step- Parameters:
currentStep
- the current step
-
getCurrentStep
Get the current step- Returns:
- the step
-
getOverriddenEffective
Get the overridden effective of a program item- Parameters:
programItemId
- the program item id- Returns:
- the overridden effective
-
getOverriddenGroups
Get the overridden number groups of a program item- Parameters:
programItemId
- the program item id- Returns:
- the overridden number of groups
-
getOverriddenVolumeOfHours
Get the overridden volume of hours of a program item- Parameters:
programItemId
- the program item idnatureId
- the nature of the volume of hours- Returns:
- the overridden volume of hours
-