Class ImmutableSqlParameter
java.lang.Object
com.databricks.jdbc.api.impl.ImmutableSqlParameter
- All Implemented Interfaces:
SqlParameter
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableSqlParameter
extends Object
implements SqlParameter
Immutable implementation of
SqlParameter.
Use the builder to create immutable instances:
ImmutableSqlParameter.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableSqlParameter. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableSqlParameter.intcardinal()static ImmutableSqlParametercopyOf(SqlParameter instance) Creates an immutable copy of aSqlParametervalue.booleanThis instance is equal to all instances ofImmutableSqlParameterthat have equal attribute values.inthashCode()Computes a hash code from attributes:value,type,cardinal.toString()Prints the immutable valueSqlParameterwith attribute values.type()value()final ImmutableSqlParameterwithCardinal(int value) Copy the current immutable object by setting a value for thecardinalattribute.final ImmutableSqlParameterwithType(ColumnInfoTypeName value) Copy the current immutable object by setting a value for thetypeattribute.final ImmutableSqlParameterCopy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
value
- Specified by:
valuein interfaceSqlParameter- Returns:
- The value of the
valueattribute
-
type
- Specified by:
typein interfaceSqlParameter- Returns:
- The value of the
typeattribute
-
cardinal
public int cardinal()- Specified by:
cardinalin interfaceSqlParameter- Returns:
- The value of the
cardinalattribute
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value (can benull)- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withCardinal
Copy the current immutable object by setting a value for thecardinalattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cardinal- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aSqlParametervalue. 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 SqlParameter instance
-
builder
Creates a builder forImmutableSqlParameter.ImmutableSqlParameter.builder() .value(Object | null) // nullablevalue.type(com.databricks.jdbc.model.core.ColumnInfoTypeName) // requiredtype.cardinal(int) // requiredcardinal.build();- Returns:
- A new ImmutableSqlParameter builder
-