Class ImmutableDeleteRow

java.lang.Object
io.dialob.session.engine.session.command.ImmutableDeleteRow
All Implemented Interfaces:
AbstractUpdateCommand<ItemId,ItemState>, Command<ItemState>, DeleteRow, ItemUpdateCommand, UpdateCommand<ItemId,ItemState>, Serializable

@Generated(from="DeleteRow", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDeleteRow extends Object implements DeleteRow
Immutable implementation of DeleteRow.

Use the builder to create immutable instances: ImmutableDeleteRow.builder(). Use the static factory method to create immutable instances: ImmutableDeleteRow.of().

See Also:
  • Method Details

    • getTriggers

      public com.google.common.collect.ImmutableList<Trigger<ItemState>> getTriggers()
      Specified by:
      getTriggers in interface Command<ItemState>
      Returns:
      The value of the triggers attribute
    • getTargetId

      public ItemId getTargetId()
      Specified by:
      getTargetId in interface UpdateCommand<ItemId,ItemState>
      Returns:
      The value of the targetId attribute
    • getToBeRemoved

      public ItemId getToBeRemoved()
      Specified by:
      getToBeRemoved in interface DeleteRow
      Returns:
      The value of the toBeRemoved attribute
    • withTriggers

      @SafeVarargs public final ImmutableDeleteRow withTriggers(Trigger<ItemState>... elements)
      Copy the current immutable object with elements that replace the content of triggers.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withTriggers

      public final ImmutableDeleteRow withTriggers(Iterable<? extends Trigger<ItemState>> elements)
      Copy the current immutable object with elements that replace the content of triggers. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of triggers elements to set
      Returns:
      A modified copy or this if not changed
    • withTargetId

      public final ImmutableDeleteRow withTargetId(ItemId value)
      Copy the current immutable object by setting a value for the targetId attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Specified by:
      withTargetId in interface UpdateCommand<ItemId,ItemState>
      Parameters:
      value - A new value for targetId
      Returns:
      A modified copy or the this object
    • withToBeRemoved

      public final ImmutableDeleteRow withToBeRemoved(ItemId value)
      Copy the current immutable object by setting a value for the toBeRemoved attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for toBeRemoved
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableDeleteRow that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: triggers, targetId, toBeRemoved.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DeleteRow with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableDeleteRow of(ItemId targetId, ItemId toBeRemoved, List<Trigger<ItemState>> triggers)
      Construct a new immutable DeleteRow instance.
      Parameters:
      targetId - The value for the targetId attribute
      toBeRemoved - The value for the toBeRemoved attribute
      triggers - The value for the triggers attribute
      Returns:
      An immutable DeleteRow instance
    • of

      public static ImmutableDeleteRow of(ItemId targetId, ItemId toBeRemoved, Iterable<? extends Trigger<ItemState>> triggers)
      Construct a new immutable DeleteRow instance.
      Parameters:
      targetId - The value for the targetId attribute
      toBeRemoved - The value for the toBeRemoved attribute
      triggers - The value for the triggers attribute
      Returns:
      An immutable DeleteRow instance
    • copyOf

      public static ImmutableDeleteRow copyOf(DeleteRow instance)
      Creates an immutable copy of a DeleteRow value. 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 for ImmutableDeleteRow.
       ImmutableDeleteRow.builder()
          .addTriggers|addAllTriggers(io.dialob.session.engine.session.command.Trigger<io.dialob.session.engine.session.model.ItemState>) // triggers elements
          .targetId(io.dialob.session.engine.session.model.ItemId) // required targetId
          .toBeRemoved(io.dialob.session.engine.session.model.ItemId) // required toBeRemoved
          .build();
       
      Returns:
      A new ImmutableDeleteRow builder