Class AttributeRecalculationManager

java.lang.Object
io.jmix.dynattrui.impl.AttributeRecalculationManager

@Component("dynat_AttributeRecalculationManager") public class AttributeRecalculationManager extends Object
  • Field Details

    • scriptEvaluator

      @Autowired protected org.springframework.scripting.ScriptEvaluator scriptEvaluator
    • attributeDependencies

      @Autowired protected AttributeDependencies attributeDependencies
    • dynAttrUiProperties

      @Autowired protected DynAttrUiProperties dynAttrUiProperties
  • Constructor Details

    • AttributeRecalculationManager

      public AttributeRecalculationManager()
  • Method Details

    • recalculateByAttribute

      public void recalculateByAttribute(Object entity, AttributeDefinition attribute)
      Performs recalculation for all dependent dynamic attributes. Recalculation is performed hierarchically.

      Recalculation level limited by cuba.dynamicAttributes.maxRecalculationLevel application property. If this property is not defined then the default value is used (default value is 10).

      Parameters:
      entity - entity with loaded dynamic attributes.
      attribute - an attribute from which the recalculation begins. Value for this attribute won't be changed, it is assumed that this attribute was updated before
    • evaluateNewValue

      protected Object evaluateNewValue(Object entity, String script)