Package io.dialob.executor.command
Class ImmutableDeleteRow
- java.lang.Object
-
- io.dialob.executor.command.ImmutableDeleteRow
-
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,ItemState>,Command<ItemState>,DeleteRow,ItemUpdateCommand,UpdateCommand<ItemId,ItemState>,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDeleteRow extends Object implements DeleteRow
Immutable implementation ofDeleteRow.Use the builder to create immutable instances:
ImmutableDeleteRow.builder(). Use the static factory method to create immutable instances:ImmutableDeleteRow.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDeleteRow.BuilderBuilds instances of typeImmutableDeleteRow.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDeleteRow.Builderbuilder()Creates a builder forImmutableDeleteRow.static ImmutableDeleteRowcopyOf(DeleteRow instance)Creates an immutable copy of aDeleteRowvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDeleteRowthat have equal attribute values.ItemIdgetTargetId()ItemIdgetToBeRemoved()com.google.common.collect.ImmutableList<Trigger<ItemState>>getTriggers()inthashCode()Computes a hash code from attributes:triggers,targetId,toBeRemoved.static ImmutableDeleteRowof(ItemId targetId, ItemId toBeRemoved, Iterable<? extends Trigger<ItemState>> triggers)Construct a new immutableDeleteRowinstance.static ImmutableDeleteRowof(ItemId targetId, ItemId toBeRemoved, List<Trigger<ItemState>> triggers)Construct a new immutableDeleteRowinstance.StringtoString()Prints the immutable valueDeleteRowwith attribute values.ImmutableDeleteRowwithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableDeleteRowwithToBeRemoved(ItemId value)Copy the current immutable object by setting a value for thetoBeRemovedattribute.ImmutableDeleteRowwithTriggers(Trigger<ItemState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableDeleteRowwithTriggers(Iterable<? extends Trigger<ItemState>> elements)Copy the current immutable object with elements that replace the content oftriggers.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.executor.command.Command
getEventMatchers
-
-
-
-
Method Detail
-
getTriggers
public com.google.common.collect.ImmutableList<Trigger<ItemState>> getTriggers()
- Specified by:
getTriggersin interfaceCommand<ItemState>- Returns:
- The value of the
triggersattribute
-
getTargetId
public ItemId getTargetId()
- Specified by:
getTargetIdin interfaceUpdateCommand<ItemId,ItemState>- Returns:
- The value of the
targetIdattribute
-
getToBeRemoved
public ItemId getToBeRemoved()
- Specified by:
getToBeRemovedin interfaceDeleteRow- Returns:
- The value of the
toBeRemovedattribute
-
withTriggers
@SafeVarargs public final ImmutableDeleteRow withTriggers(Trigger<ItemState>... elements)
Copy the current immutable object with elements that replace the content oftriggers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTriggers
public final ImmutableDeleteRow withTriggers(Iterable<? extends Trigger<ItemState>> elements)
Copy the current immutable object with elements that replace the content oftriggers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of triggers elements to set- Returns:
- A modified copy of
thisobject
-
withTargetId
public final ImmutableDeleteRow withTargetId(ItemId value)
Copy the current immutable object by setting a value for thetargetIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Specified by:
withTargetIdin interfaceUpdateCommand<ItemId,ItemState>- Parameters:
value- A new value for targetId- Returns:
- A modified copy of the
thisobject
-
withToBeRemoved
public final ImmutableDeleteRow withToBeRemoved(ItemId value)
Copy the current immutable object by setting a value for thetoBeRemovedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for toBeRemoved- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableDeleteRowthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:triggers,targetId,toBeRemoved.
-
toString
public String toString()
Prints the immutable valueDeleteRowwith attribute values.
-
of
public static ImmutableDeleteRow of(ItemId targetId, ItemId toBeRemoved, List<Trigger<ItemState>> triggers)
Construct a new immutableDeleteRowinstance.- Parameters:
targetId- The value for thetargetIdattributetoBeRemoved- The value for thetoBeRemovedattributetriggers- The value for thetriggersattribute- Returns:
- An immutable DeleteRow instance
-
of
public static ImmutableDeleteRow of(ItemId targetId, ItemId toBeRemoved, Iterable<? extends Trigger<ItemState>> triggers)
Construct a new immutableDeleteRowinstance.- Parameters:
targetId- The value for thetargetIdattributetoBeRemoved- The value for thetoBeRemovedattributetriggers- The value for thetriggersattribute- Returns:
- An immutable DeleteRow instance
-
copyOf
public static ImmutableDeleteRow copyOf(DeleteRow instance)
Creates an immutable copy of aDeleteRowvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable DeleteRow instance
-
builder
public static ImmutableDeleteRow.Builder builder()
Creates a builder forImmutableDeleteRow.ImmutableDeleteRow.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ItemState>) //triggerselements .targetId(io.dialob.executor.model.ItemId) // requiredtargetId.toBeRemoved(io.dialob.executor.model.ItemId) // requiredtoBeRemoved.build();- Returns:
- A new ImmutableDeleteRow builder
-
-