@NotThreadSafe public class BoundStatementBuilder extends StatementBuilder<BoundStatementBuilder,BoundStatement> implements Bindable<BoundStatementBuilder>
This class is mutable and not thread-safe.
consistencyLevel, executionProfile, executionProfileName, idempotent, node, nowInSeconds, pageSize, pagingState, routingKey, routingKeyspace, routingToken, serialConsistencyLevel, timeout, timestamp, tracing
Constructor and Description |
---|
BoundStatementBuilder(BoundStatement template) |
BoundStatementBuilder(PreparedStatement preparedStatement,
ColumnDefinitions variableDefinitions,
ByteBuffer[] values,
String executionProfileName,
DriverExecutionProfile executionProfile,
CqlIdentifier routingKeyspace,
ByteBuffer routingKey,
Token routingToken,
Map<String,ByteBuffer> customPayload,
Boolean idempotent,
boolean tracing,
long timestamp,
ByteBuffer pagingState,
int pageSize,
ConsistencyLevel consistencyLevel,
ConsistencyLevel serialConsistencyLevel,
Duration timeout,
CodecRegistry codecRegistry,
ProtocolVersion protocolVersion) |
Modifier and Type | Method and Description |
---|---|
BoundStatement |
build() |
CodecRegistry |
codecRegistry()
Returns the registry of all the codecs currently available to convert values for this instance.
|
int |
firstIndexOf(CqlIdentifier id)
Returns the first index where a given identifier appears (depending on the implementation,
identifiers may appear multiple times).
|
int |
firstIndexOf(String name)
Returns the first index where a given identifier appears (depending on the implementation,
identifiers may appear multiple times).
|
ByteBuffer |
getBytesUnsafe(int i)
Returns the raw binary representation of the
i th value. |
DataType |
getType(int i)
Returns the CQL type of the
i th value. |
ProtocolVersion |
protocolVersion()
Returns the protocol version that is currently used to convert values for this instance.
|
BoundStatementBuilder |
setBytesUnsafe(int i,
ByteBuffer v)
Sets the raw binary representation of the
i th value. |
int |
size()
Returns the number of values.
|
addCustomPayload, buildCustomPayload, clearCustomPayload, setConsistencyLevel, setExecutionProfile, setExecutionProfileName, setIdempotence, setNode, setNowInSeconds, setPageSize, setPagingState, setQueryTimestamp, setRoutingKey, setRoutingKey, setRoutingKeyspace, setRoutingKeyspace, setRoutingToken, setSerialConsistencyLevel, setTimeout, setTracing, setTracing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSet, isSet, isSet, unset, unset, unset
get, get, get, getBigDecimal, getBigInteger, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNull
get, get, get, getBigDecimal, getBigInteger, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNull
get, get, get, getBigDecimal, getBigInteger, getBoolean, getByte, getByteBuffer, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNull
getType, set, set, set, setBigDecimal, setBigInteger, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuid
getType, set, set, set, setBigDecimal, setBigInteger, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuid
set, set, set, setBigDecimal, setBigInteger, setBoolean, setByte, setByteBuffer, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuid
public BoundStatementBuilder(@NonNull PreparedStatement preparedStatement, @NonNull ColumnDefinitions variableDefinitions, @NonNull ByteBuffer[] values, @Nullable String executionProfileName, @Nullable DriverExecutionProfile executionProfile, @Nullable CqlIdentifier routingKeyspace, @Nullable ByteBuffer routingKey, @Nullable Token routingToken, @NonNull Map<String,ByteBuffer> customPayload, @Nullable Boolean idempotent, boolean tracing, long timestamp, @Nullable ByteBuffer pagingState, int pageSize, @Nullable ConsistencyLevel consistencyLevel, @Nullable ConsistencyLevel serialConsistencyLevel, @Nullable Duration timeout, @NonNull CodecRegistry codecRegistry, @NonNull ProtocolVersion protocolVersion)
public BoundStatementBuilder(@NonNull BoundStatement template)
public int firstIndexOf(@NonNull CqlIdentifier id)
AccessibleById
firstIndexOf
in interface AccessibleById
public int firstIndexOf(@NonNull String name)
AccessibleByName
firstIndexOf
in interface AccessibleByName
@NonNull public BoundStatementBuilder setBytesUnsafe(int i, ByteBuffer v)
SettableByIndex
i
th value.
This is primarily for internal use; you'll likely want to use one of the typed setters instead, to pass a higher-level Java representation.
setBytesUnsafe
in interface SettableByIndex<BoundStatementBuilder>
v
- the raw value, or null
to set the CQL value NULL
. For performance
reasons, this is the actual instance used internally. If pass in a buffer that you're going
to modify elsewhere in your application, make sure to duplicate
it beforehand. If you change the buffer's index or its contents in any way,
further usage of this data will have unpredictable results.public ByteBuffer getBytesUnsafe(int i)
GettableByIndex
i
th value.
This is primarily for internal use; you'll likely want to use one of the typed getters instead, to get a higher-level Java representation.
getBytesUnsafe
in interface GettableByIndex
null
if the CQL value is NULL
. For performance
reasons, this is the actual instance used internally. If you read data from the buffer,
make sure to duplicate
it beforehand, or only use relative
methods. If you change the buffer's index or its contents in any way, any other getter
invocation for this value will have unpredictable results.public int size()
AccessibleByIndex
size
in interface AccessibleByIndex
@NonNull public DataType getType(int i)
AccessibleByIndex
i
th value.getType
in interface AccessibleByIndex
@NonNull public CodecRegistry codecRegistry()
Data
If you obtained this object from the driver, this will be set automatically. If you created
it manually, or just deserialized it, it is set to CodecRegistry.DEFAULT
. You can
reattach this object to an existing driver instance to use its codec registry.
codecRegistry
in interface Data
Detachable
@NonNull public ProtocolVersion protocolVersion()
Data
If you obtained this object from the driver, this will be set automatically. If you created
it manually, or just deserialized it, it is set to ProtocolVersion.DEFAULT
. You
can reattach this object to an existing driver instance to use its protocol version.
protocolVersion
in interface Data
Detachable
@NonNull public BoundStatement build()
build
in class StatementBuilder<BoundStatementBuilder,BoundStatement>
Copyright © 2017–2024. All rights reserved.