Class ImmutableBatchCommand
- java.lang.Object
-
- com.databricks.jdbc.api.impl.batch.ImmutableBatchCommand
-
- All Implemented Interfaces:
BatchCommand
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableBatchCommand extends Object implements BatchCommand
Immutable implementation ofBatchCommand.Use the builder to create immutable instances:
ImmutableBatchCommand.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableBatchCommand.BuilderBuilds instances of typeImmutableBatchCommand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableBatchCommand.Builderbuilder()Creates a builder forImmutableBatchCommand.static ImmutableBatchCommandcopyOf(BatchCommand instance)Creates an immutable copy of aBatchCommandvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableBatchCommandthat have equal attribute values.StringgetSql()Returns the SQL command string.inthashCode()Computes a hash code from attributes:sql.StringtoString()Prints the immutable valueBatchCommandwith attribute values.ImmutableBatchCommandwithSql(String value)Copy the current immutable object by setting a value for thesqlattribute.
-
-
-
Method Detail
-
getSql
public String getSql()
Returns the SQL command string.- Specified by:
getSqlin interfaceBatchCommand
-
withSql
public final ImmutableBatchCommand withSql(String value)
Copy the current immutable object by setting a value for thesqlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sql- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableBatchCommandthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:sql.
-
toString
public String toString()
Prints the immutable valueBatchCommandwith attribute values.
-
copyOf
public static ImmutableBatchCommand copyOf(BatchCommand instance)
Creates an immutable copy of aBatchCommandvalue. 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 BatchCommand instance
-
builder
public static ImmutableBatchCommand.Builder builder()
Creates a builder forImmutableBatchCommand.ImmutableBatchCommand.builder() .sql(String) // requiredsql.build();- Returns:
- A new ImmutableBatchCommand builder
-
-