Record Class Change
java.lang.Object
java.lang.Record
io.fluxzero.sdk.modeling.Change
public record Change(String modelId, Class<?> modelType, long beforeSequenceNumber, Long beforeLastEventIndex, Object before, Object after, Executable handler, UnaryOperator<Entity<?>> directReplay, boolean cascadedDeletion, EntityMetadata metadata, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy, GraphProjectionCompletion graphProjectionCompletion, boolean active, boolean storeEvent, boolean publishEvent, boolean updateState)
extends Record
One fully resolved immutable model mutation outcome consumed by commit preparation.
This type is public only so the repository package can consume the canonical internal value directly; it is not a supported application extension point.
-
Constructor Summary
ConstructorsConstructorDescriptionChange(String modelId, Class<?> modelType, long beforeSequenceNumber, Long beforeLastEventIndex, Object before, Object after, Executable handler, UnaryOperator<Entity<?>> directReplay, boolean cascadedDeletion, EntityMetadata metadata, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy, GraphProjectionCompletion graphProjectionCompletion, boolean active, boolean storeEvent, boolean publishEvent, boolean updateState) Creates an instance of aChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.after()Returns the value of theafterrecord component.before()Returns the value of thebeforerecord component.Returns the value of thebeforeLastEventIndexrecord component.longReturns the value of thebeforeSequenceNumberrecord component.booleanReturns the value of thecascadedDeletionrecord component.io.fluxzero.common.api.modeling.ModelConflictPolicyReturns the value of theconflictPolicyrecord component.booleanWhether this change originated from a direct graph mutation rather than a model handler.UnaryOperator<Entity<?>> Returns the value of thedirectReplayrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegraphProjectionCompletionrecord component.handler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.modelId()Returns the value of themodelIdrecord component.Class<?> Returns the value of themodelTyperecord component.booleanReturns the value of thepublishEventrecord component.booleanReturns the value of thestoreEventrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theupdateStaterecord component.voidvalidate()withEffects(boolean storeEvent, boolean publishEvent, boolean updateState)
-
Constructor Details
-
Change
public Change(String modelId, Class<?> modelType, long beforeSequenceNumber, Long beforeLastEventIndex, Object before, Object after, Executable handler, UnaryOperator<Entity<?>> directReplay, boolean cascadedDeletion, EntityMetadata metadata, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy, GraphProjectionCompletion graphProjectionCompletion, boolean active, boolean storeEvent, boolean publishEvent, boolean updateState) Creates an instance of aChangerecord class.- Parameters:
modelId- the value for themodelIdrecord componentmodelType- the value for themodelTyperecord componentbeforeSequenceNumber- the value for thebeforeSequenceNumberrecord componentbeforeLastEventIndex- the value for thebeforeLastEventIndexrecord componentbefore- the value for thebeforerecord componentafter- the value for theafterrecord componenthandler- the value for thehandlerrecord componentdirectReplay- the value for thedirectReplayrecord componentcascadedDeletion- the value for thecascadedDeletionrecord componentmetadata- the value for themetadatarecord componentconflictPolicy- the value for theconflictPolicyrecord componentgraphProjectionCompletion- the value for thegraphProjectionCompletionrecord componentactive- the value for theactiverecord componentstoreEvent- the value for thestoreEventrecord componentpublishEvent- the value for thepublishEventrecord componentupdateState- the value for theupdateStaterecord component
-
-
Method Details
-
withEffects
-
directMutation
public boolean directMutation()Whether this change originated from a direct graph mutation rather than a model handler. -
validate
public void validate() -
configuration
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
modelId
Returns the value of themodelIdrecord component.- Returns:
- the value of the
modelIdrecord component
-
modelType
Returns the value of themodelTyperecord component.- Returns:
- the value of the
modelTyperecord component
-
beforeSequenceNumber
public long beforeSequenceNumber()Returns the value of thebeforeSequenceNumberrecord component.- Returns:
- the value of the
beforeSequenceNumberrecord component
-
beforeLastEventIndex
Returns the value of thebeforeLastEventIndexrecord component.- Returns:
- the value of the
beforeLastEventIndexrecord component
-
before
Returns the value of thebeforerecord component.- Returns:
- the value of the
beforerecord component
-
after
Returns the value of theafterrecord component.- Returns:
- the value of the
afterrecord component
-
handler
Returns the value of thehandlerrecord component.- Returns:
- the value of the
handlerrecord component
-
directReplay
Returns the value of thedirectReplayrecord component.- Returns:
- the value of the
directReplayrecord component
-
cascadedDeletion
public boolean cascadedDeletion()Returns the value of thecascadedDeletionrecord component.- Returns:
- the value of the
cascadedDeletionrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
conflictPolicy
public io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy()Returns the value of theconflictPolicyrecord component.- Returns:
- the value of the
conflictPolicyrecord component
-
graphProjectionCompletion
Returns the value of thegraphProjectionCompletionrecord component.- Returns:
- the value of the
graphProjectionCompletionrecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
storeEvent
public boolean storeEvent()Returns the value of thestoreEventrecord component.- Returns:
- the value of the
storeEventrecord component
-
publishEvent
public boolean publishEvent()Returns the value of thepublishEventrecord component.- Returns:
- the value of the
publishEventrecord component
-
updateState
public boolean updateState()Returns the value of theupdateStaterecord component.- Returns:
- the value of the
updateStaterecord component
-