Package ai.mindconnect.common
Record Class DomainEvent
java.lang.Object
java.lang.Record
ai.mindconnect.common.DomainEvent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord 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.Returns the value of thenamespacerecord component.Returns the value of theoccurredAtrecord component.static DomainEventof(String channel, String type, String sourceService, String sourceRefId, Namespace namespace, Map<String, Object> payload) payload()Returns the value of thepayloadrecord component.Returns the value of thesourceRefIdrecord component.Returns the value of thesourceServicerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
DomainEvent
public DomainEvent(UUID id, String channel, String type, String sourceService, String sourceRefId, Namespace namespace, Map<String, Object> payload, Instant occurredAt) Creates an instance of aDomainEventrecord class.- Parameters:
id- the value for theidrecord componentchannel- the value for thechannelrecord componenttype- the value for thetyperecord componentsourceService- the value for thesourceServicerecord componentsourceRefId- the value for thesourceRefIdrecord componentnamespace- the value for thenamespacerecord componentpayload- the value for thepayloadrecord componentoccurredAt- the value for theoccurredAtrecord component
-
-
Method Details
-
of
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
channel
Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
sourceService
Returns the value of thesourceServicerecord component.- Returns:
- the value of the
sourceServicerecord component
-
sourceRefId
Returns the value of thesourceRefIdrecord component.- Returns:
- the value of the
sourceRefIdrecord component
-
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
occurredAt
Returns the value of theoccurredAtrecord component.- Returns:
- the value of the
occurredAtrecord component
-