Record Class DefaultSnapshotStore.SnapshotDocument
java.lang.Object
java.lang.Record
io.fluxzero.sdk.persisting.eventsourcing.DefaultSnapshotStore.SnapshotDocument
- Enclosing class:
DefaultSnapshotStore
@Searchable(collection="$snapshots",
timestampPath="timestamp")
@SearchExclude
protected static record DefaultSnapshotStore.SnapshotDocument(String id, String aggregateId, long sequenceNumber, Instant timestamp, Data<byte[]> serializedSnapshot)
extends Record
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSnapshotDocument(String id, String aggregateId, long sequenceNumber, Instant timestamp, Data<byte[]> serializedSnapshot) Creates an instance of aSnapshotDocumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaggregateIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.longReturns the value of thesequenceNumberrecord component.Data<byte[]> Returns the value of theserializedSnapshotrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SnapshotDocument
protected SnapshotDocument(String id, String aggregateId, long sequenceNumber, Instant timestamp, Data<byte[]> serializedSnapshot) Creates an instance of aSnapshotDocumentrecord class.- Parameters:
id- the value for theidrecord componentaggregateId- the value for theaggregateIdrecord componentsequenceNumber- the value for thesequenceNumberrecord componenttimestamp- the value for thetimestamprecord componentserializedSnapshot- the value for theserializedSnapshotrecord component
-
-
Method Details
-
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. -
id
-
aggregateId
Returns the value of theaggregateIdrecord component.- Returns:
- the value of the
aggregateIdrecord component
-
sequenceNumber
Returns the value of thesequenceNumberrecord component.- Returns:
- the value of the
sequenceNumberrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
serializedSnapshot
Returns the value of theserializedSnapshotrecord component.- Returns:
- the value of the
serializedSnapshotrecord component
-