Class ImmutableTxScope

java.lang.Object
io.resys.thena.spi.ImmutableTxScope
All Implemented Interfaces:
TenantDataSource.TxScope

@Generated(from="TenantDataSource.TxScope", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableTxScope extends Object implements TenantDataSource.TxScope
Immutable implementation of TenantDataSource.TxScope.

Use the builder to create immutable instances: ImmutableTxScope.builder().

  • Method Details

    • getTenantId

      public String getTenantId()
      Specified by:
      getTenantId in interface TenantDataSource.TxScope
      Returns:
      The value of the tenantId attribute
    • getCommitAuthor

      public String getCommitAuthor()
      Specified by:
      getCommitAuthor in interface TenantDataSource.TxScope
      Returns:
      The value of the commitAuthor attribute
    • getCommitMessage

      public String getCommitMessage()
      Specified by:
      getCommitMessage in interface TenantDataSource.TxScope
      Returns:
      The value of the commitMessage attribute
    • withTenantId

      public final ImmutableTxScope withTenantId(String value)
      Copy the current immutable object by setting a value for the tenantId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for tenantId
      Returns:
      A modified copy or the this object
    • withCommitAuthor

      public final ImmutableTxScope withCommitAuthor(String value)
      Copy the current immutable object by setting a value for the commitAuthor attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for commitAuthor
      Returns:
      A modified copy or the this object
    • withCommitMessage

      public final ImmutableTxScope withCommitMessage(String value)
      Copy the current immutable object by setting a value for the commitMessage attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for commitMessage
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableTxScope 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: tenantId, commitAuthor, commitMessage.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableTxScope copyOf(TenantDataSource.TxScope instance)
      Creates an immutable copy of a TenantDataSource.TxScope 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 TxScope instance
    • builder

      public static ImmutableTxScope.Builder builder()
      Creates a builder for ImmutableTxScope.
       ImmutableTxScope.builder()
          .tenantId(String) // required tenantId
          .commitAuthor(String) // required commitAuthor
          .commitMessage(String) // required commitMessage
          .build();
       
      Returns:
      A new ImmutableTxScope builder