Package io.umadb.client
Record Class AppendRequest
java.lang.Object
java.lang.Record
io.umadb.client.AppendRequest
- Record Components:
events- the non-null, non-empty list of events to appendcondition- an optionalAppendConditionthat must be satisfied for the append operation to succeed; may benull
Represents a request to append one or more events.
-
Constructor Summary
ConstructorsConstructorDescriptionAppendRequest(List<Event> events, AppendCondition condition) Creates a newAppendRequest. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.events()Returns the value of theeventsrecord component.final inthashCode()Returns a hash code value for this object.static AppendRequestCreates anAppendRequestwithout any append condition.static AppendRequestof(List<Event> events, AppendCondition condition) Creates anAppendRequestwith the given append condition.final StringtoString()Returns a string representation of this record class.withCondition(AppendCondition condition) Returns a copy of this request with the given append condition applied.
-
Constructor Details
-
AppendRequest
Creates a newAppendRequest.- Throws:
IllegalArgumentException- ifeventsisnullor empty
-
-
Method Details
-
of
Creates anAppendRequestwithout any append condition.- Parameters:
events- the events to append- Returns:
- a new
AppendRequest - Throws:
IllegalArgumentException- ifeventsisnullor empty
-
of
Creates anAppendRequestwith the given append condition.- Parameters:
events- the events to appendcondition- the append condition to apply- Returns:
- a new
AppendRequest - Throws:
IllegalArgumentException- ifeventsisnullor empty
-
withCondition
Returns a copy of this request with the given append condition applied.- Parameters:
condition- the append condition to apply- Returns:
- a new
AppendRequestwith the specified condition
-
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). -
events
Returns the value of theeventsrecord component.- Returns:
- the value of the
eventsrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-