@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 |
|---|---|
List<Integer> |
allIndicesOf(CqlIdentifier id)
Returns all the indices where a given identifier appears.
|
List<Integer> |
allIndicesOf(String name)
Returns all the indices where a given identifier appears.
|
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
ith value. |
DataType |
getType(int i)
Returns the CQL type of the
ith 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
ith value. |
int |
size()
Returns the number of values.
|
addCustomPayload, buildCustomPayload, clearCustomPayload, disableTracing, enableTracing, setConsistencyLevel, setDefaultTimestamp, setExecutionProfile, setExecutionProfileName, setFetchSize, setIdempotence, setNode, setNowInSeconds, setPageSize, setPagingState, setQueryTimestamp, setRoutingKey, setRoutingKey, setRoutingKeyspace, setRoutingKeyspace, setRoutingToken, setSerialConsistencyLevel, setTimeout, setTracing, setTracingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSet, isSet, isSet, unset, unset, unsetget, get, get, getBigDecimal, getBigInteger, getBool, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNullget, get, get, getBigDecimal, getBigInteger, getBool, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNullget, get, get, getBigDecimal, getBigInteger, getBool, getBoolean, getByte, getByteBuffer, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNullgetType, set, set, set, setBigDecimal, setBigInteger, setBool, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuidgetType, set, set, set, setBigDecimal, setBigInteger, setBool, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuidset, set, set, setBigDecimal, setBigInteger, setBool, setBoolean, setByte, setByteBuffer, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuidpublic 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)
@NonNull public List<Integer> allIndicesOf(@NonNull CqlIdentifier id)
AccessibleByIdallIndicesOf in interface AccessibleByIdpublic int firstIndexOf(@NonNull
CqlIdentifier id)
AccessibleByIdfirstIndexOf in interface AccessibleById@NonNull public List<Integer> allIndicesOf(@NonNull String name)
AccessibleByNameallIndicesOf in interface AccessibleByNamepublic int firstIndexOf(@NonNull
String name)
AccessibleByNamefirstIndexOf in interface AccessibleByName@NonNull public BoundStatementBuilder setBytesUnsafe(int i, ByteBuffer v)
SettableByIndexith 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)
GettableByIndexith 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 GettableByIndexnull 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()
AccessibleByIndexsize in interface AccessibleByIndex@NonNull public DataType getType(int i)
AccessibleByIndexith value.getType in interface AccessibleByIndex@NonNull public CodecRegistry codecRegistry()
DataIf 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 DataDetachable@NonNull public ProtocolVersion protocolVersion()
DataIf 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 DataDetachable@NonNull public BoundStatement build()
build in class StatementBuilder<BoundStatementBuilder,BoundStatement>Copyright © 2017–2020. All rights reserved.