Package com.opencqrs.esdb.client
Record Class Precondition.SubjectIsOnEventId
java.lang.Object
java.lang.Record
com.opencqrs.esdb.client.Precondition.SubjectIsOnEventId
- Record Components:
subject- the path to the subjecteventId- the expected event id
- All Implemented Interfaces:
Precondition
- Enclosing interface:
Precondition
public static record Precondition.SubjectIsOnEventId(@NotBlank String subject, @NotBlank String eventId)
extends Record
implements Precondition
A precondition stating the given subject must have been updated by the given event id. The precondition is
violated if either the subject does not exist at all or an event with another id has already been published for
that subject.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.opencqrs.esdb.client.Precondition
Precondition.EventQlQueryIsTrue, Precondition.SubjectIsOnEventId, Precondition.SubjectIsPopulated, Precondition.SubjectIsPristine -
Constructor Summary
ConstructorsConstructorDescriptionSubjectIsOnEventId(@NotBlank String subject, @NotBlank String eventId) Creates an instance of aSubjectIsOnEventIdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotBlank StringeventId()Returns the value of theeventIdrecord component.final inthashCode()Returns a hash code value for this object.@NotBlank Stringsubject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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). -
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
eventId
Returns the value of theeventIdrecord component.- Returns:
- the value of the
eventIdrecord component
-