Class ImmutableSql

java.lang.Object
io.resys.thena.datasource.ImmutableSql
All Implemented Interfaces:
ThenaSqlClient.Sql

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

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

  • Method Details

    • getValue

      public String getValue()
      Specified by:
      getValue in interface ThenaSqlClient.Sql
      Returns:
      The value of the value attribute
    • withValue

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

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

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

      public static ImmutableSql copyOf(ThenaSqlClient.Sql instance)
      Creates an immutable copy of a ThenaSqlClient.Sql 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 Sql instance
    • builder

      public static ImmutableSql.Builder builder()
      Creates a builder for ImmutableSql.
       ImmutableSql.builder()
          .value(String) // required value
          .build();
       
      Returns:
      A new ImmutableSql builder