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.SubjectIsOnEventId, Precondition.SubjectIsPristine
-
Constructor Summary
ConstructorsConstructorDescriptionSubjectIsOnEventId
(@NotBlank String subject, @NotBlank String eventId) Creates an instance of aSubjectIsOnEventId
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.@NotBlank String
eventId()
Returns the value of theeventId
record component.final int
hashCode()
Returns a hash code value for this object.@NotBlank String
subject()
Returns the value of thesubject
record component.final String
toString()
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 thesubject
record component.- Returns:
- the value of the
subject
record component
-
eventId
Returns the value of theeventId
record component.- Returns:
- the value of the
eventId
record component
-