Class ImmutableBatchCommand.Builder
- java.lang.Object
-
- com.databricks.jdbc.api.impl.batch.ImmutableBatchCommand.Builder
-
- Enclosing class:
- ImmutableBatchCommand
@NotThreadSafe public static final class ImmutableBatchCommand.Builder extends Object
Builds instances of typeImmutableBatchCommand. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableBatchCommandbuild()Builds a newImmutableBatchCommand.ImmutableBatchCommand.Builderfrom(BatchCommand instance)Fill a builder with attribute values from the providedBatchCommandinstance.ImmutableBatchCommand.Buildersql(String sql)Initializes the value for thesqlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableBatchCommand.Builder from(BatchCommand instance)
Fill a builder with attribute values from the providedBatchCommandinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
sql
@CanIgnoreReturnValue public final ImmutableBatchCommand.Builder sql(String sql)
Initializes the value for thesqlattribute.- Parameters:
sql- The value for sql- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableBatchCommand build()
Builds a newImmutableBatchCommand.- Returns:
- An immutable instance of BatchCommand
- Throws:
IllegalStateException- if any required attributes are missing
-
-