Package io.jmix.dynmodel.impl
Class DynamicCalculatedAttributeSupport
java.lang.Object
io.jmix.dynmodel.impl.DynamicCalculatedAttributeSupport
@Component("dynmod_DynamicCalculatedAttributeSupport")
public class DynamicCalculatedAttributeSupport
extends Object
Runtime service for calculated dynamic attribute access and write protection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DynamicModelToolsprotected DynModelPropertiesprotected final ThreadLocal<Deque<DynamicCalculatedAttributeSupport.EvaluationKey>> protected Metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ObjectEvaluates a calculated dynamic attribute on the supplied entity.voidrejectWrite(MetaProperty property) Throws an access exception for attempts to write a calculated dynamic attribute.
-
Field Details
-
metadata
-
dynModelProperties
-
dynamicModelTools
-
evaluatorRegistry
-
evaluationStack
-
-
Constructor Details
-
DynamicCalculatedAttributeSupport
public DynamicCalculatedAttributeSupport()
-
-
Method Details
-
getValue
Evaluates a calculated dynamic attribute on the supplied entity.- Parameters:
entity- entity instancepropertyName- calculated property name- Returns:
- calculated value, or
nullwhen evaluation fails or the property is not calculated
-
rejectWrite
Throws an access exception for attempts to write a calculated dynamic attribute.- Parameters:
property- calculated metadata property
-