Class CostComputationDataCache

java.lang.Object
org.ametys.plugins.odfpilotage.cost.entity.CostComputationDataCache

public class CostComputationDataCache extends Object
This class store caches of the CostComputationDataComponent
  • Field Details

  • Constructor Details

  • Method Details

    • _initializeNormData

      Retrieve norm values created and initialize informations about them in the cache
      Parameters:
      norms - list of norms
    • _initializeNatureData

      protected void _initializeNatureData(List<OdfReferenceTableEntry> teachingNatures)
      Retrieve teaching nature values created and initialize informations about them in the cache
      Parameters:
      teachingNatures - list of teaching natures
    • getEqTDByNature

      public Double getEqTDByNature(String natureId)
      Get an eqTD value from a natureId
      Parameters:
      natureId - the nature id
      Returns:
      the eqTD value
    • putEqTDByNature

      public void putEqTDByNature(String natureId, Double eqTD)
      Put an eqTD value in the map
      Parameters:
      natureId - the nature id
      eqTD - the eqTD value
    • getEffectiveMinMaxByNature

      Get an effectiveMinMax from a nature id
      Parameters:
      natureId - the nature id
      Returns:
      the effective min max
    • putEffectiveMinMaxByNature

      public void putEffectiveMinMaxByNature(String natureId, Map<String,Long> effectiveMinMax)
      Put an effectiveMinMax in the map
      Parameters:
      natureId - the nature id
      effectiveMinMax - the effective min max
    • getNorms

      public NormDetails getNorms(String normId, String natureId)
      Get the norm retrieved by a nature id
      Parameters:
      normId - the norm id
      natureId - the nature id
      Returns:
      the norm
    • normsContainsNormIdKey

      public boolean normsContainsNormIdKey(String normId)
      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

      public boolean normsContainsNatureIdKey(String normId, String natureId)
      Check if the norms map contains the nature id
      Parameters:
      normId - the norm id
      natureId - the nature id
      Returns:
      true if the norms map contains the nature id
    • putNorms

      public void putNorms(String normId, Map<String,NormDetails> normValue)
      Put a norm value in the map
      Parameters:
      normId - the norm id
      normValue - the value
    • getEnteredEffectiveCache

      public Double getEnteredEffectiveCache(String programItemId)
      Get an enteredEffective from a program item id
      Parameters:
      programItemId - the program item id
      Returns:
      the entered effective
    • putEnteredEffectiveCache

      public void putEnteredEffectiveCache(String programItemId, Double enteredEffective)
      Put an entered effective in the map
      Parameters:
      programItemId - the program item id
      enteredEffective - the entered effective
    • getComputedEffectiveCache

      Get a calculated effective from a program item id
      Parameters:
      programItemId - the program item id
      Returns:
      the calculated effective
    • putComputedEffectiveCache

      public void putComputedEffectiveCache(String programItemId, Effectives calculatedEffective)
      Put a calculated effective in the map
      Parameters:
      programItemId - the program item id
      calculatedEffective - the calculated effective
    • putWeight

      public void putWeight(String programItemPath, Double weight)
      Put a weight in the map
      Parameters:
      programItemPath - the program item id
      weight - the weight
    • getWeight

      public Double getWeight(String programItemPath)
      Get a calculated effective from a program item
      Parameters:
      programItemPath - the path of the program item
      Returns:
      the calculated effective
    • setCurrentStep

      public void setCurrentStep(Container currentStep)
      Set the current step
      Parameters:
      currentStep - the current step
    • getCurrentStep

      Get the current step
      Returns:
      the step
    • getOverriddenEffective

      public Optional<Double> getOverriddenEffective(String programItemId)
      Get the overridden effective of a program item
      Parameters:
      programItemId - the program item id
      Returns:
      the overridden effective
    • getOverriddenGroups

      public Optional<Double> getOverriddenGroups(String programItemId)
      Get the overridden number groups of a program item
      Parameters:
      programItemId - the program item id
      Returns:
      the overridden number of groups
    • getOverriddenVolumeOfHours

      public Optional<Double> getOverriddenVolumeOfHours(String programItemId, String natureId)
      Get the overridden volume of hours of a program item
      Parameters:
      programItemId - the program item id
      natureId - the nature of the volume of hours
      Returns:
      the overridden volume of hours