Package io.jmix.flowui.model.impl
Class DataContextDiagnostics
java.lang.Object
io.jmix.flowui.model.impl.DataContextDiagnostics
Builds diagnostic log messages for attribute-level dirty tracking and merge decisions in
DataContextImpl and DataContextChangeTracker. All output goes through the
io.jmix.flowui.datacontext.diagnostics logger category at DEBUG level; call sites are
expected to guard with log.isDebugEnabled() before building a message.
Messages never call toString() on an entity (which could trigger lazy loading or
instance-name resolution over unfetched attributes); entities are rendered as
ClassName-id via formatEntity(Object) instead.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNot meant to be instantiated directly;protectedonly so the class can be subclassed to add or reuse message formats. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringattributeDirtied(Object entity, String attribute, @Nullable Object baseline) Message for an attribute that just became dirty, showing the baseline its future changes are measured against.static StringattributeReverted(Object entity, String attribute) Message for an attribute whose value returned to its baseline and is therefore no longer dirty.static StringbaselineRebased(Object entity, String attribute, @Nullable Object newBaseline) Message for a dirty attribute whose baseline was moved to an incoming (merged) value by a fresh merge.static StringformatEntity(@Nullable Object value) Renders a value for a diagnostic message:ClassName-idfor entities,"<collection>"for a membership bag (used as a collection baseline),"null"for null, andString.valueOfotherwise.static StringmergeSkippedDirty(Object entity, String attribute) Message for a non-fresh merge that left a dirty attribute untouched, keeping the user's unsaved value.static StringMessage warning thatmerge()was called on a read-onlyNoopDataContext, so the change is neither tracked nor saved.
-
Field Details
-
log
protected static final org.slf4j.Logger log
-
-
Constructor Details
-
DataContextDiagnostics
protected DataContextDiagnostics()Not meant to be instantiated directly;protectedonly so the class can be subclassed to add or reuse message formats.
-
-
Method Details
-
attributeDirtied
Message for an attribute that just became dirty, showing the baseline its future changes are measured against. -
attributeReverted
Message for an attribute whose value returned to its baseline and is therefore no longer dirty. -
mergeSkippedDirty
Message for a non-fresh merge that left a dirty attribute untouched, keeping the user's unsaved value. -
baselineRebased
Message for a dirty attribute whose baseline was moved to an incoming (merged) value by a fresh merge. -
readOnlyContextMerge
Message warning thatmerge()was called on a read-onlyNoopDataContext, so the change is neither tracked nor saved. -
formatEntity
Renders a value for a diagnostic message:ClassName-idfor entities,"<collection>"for a membership bag (used as a collection baseline),"null"for null, andString.valueOfotherwise. Never callstoString()on an entity.
-