public interface MutableValueInfo
Holds information on mutable values (like plain beans stored as json).
Used internally in EntityBeanIntercept for dirty detection on mutable values. Typically, mutation detection is based on a hash/checksum of json content or the original json content itself.
Refer to the mapping options @DbJson(mutationDetection)
.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
get()
Creates a new instance from the internal json string.boolean
isEqualToObject
(Object obj) Compares the given object to an internal value.Compares the given json returning null if deemed unchanged or returning the MutableValueNext to use if deemed dirty/changed.
-
Method Details
-
nextDirty
Compares the given json returning null if deemed unchanged or returning the MutableValueNext to use if deemed dirty/changed.Returning MutableValueNext allows an implementation based on hash/checksum to only perform that computation once.
- Returns:
- Null if deemed unchanged or the MutableValueNext if deemed changed.
-
isEqualToObject
Compares the given object to an internal value.This is used to support changelog/beanState. The implementation can serialize the object into json form and compare it against the original json.
-
get
Creates a new instance from the internal json string.This is used to provide an original/old value for change logging / persist listeners. This is only available for properties that have
@DbJson(keepSource=true)
.
-