public static class CassandraTemplate.PreparedStatementHandler extends Object implements PreparedStatementCreator, PreparedStatementBinder, CqlProvider
SimpleStatement and bind values associated with the statement to a
BoundStatement.| Constructor and Description |
|---|
PreparedStatementHandler(com.datastax.oss.driver.api.core.cql.Statement<?> statement) |
| Modifier and Type | Method and Description |
|---|---|
com.datastax.oss.driver.api.core.cql.BoundStatement |
bindValues(com.datastax.oss.driver.api.core.cql.PreparedStatement ps)
Bind parameter values on the given
PreparedStatement. |
com.datastax.oss.driver.api.core.cql.PreparedStatement |
createPreparedStatement(com.datastax.oss.driver.api.core.CqlSession session)
Create a statement in this session.
|
String |
getCql()
Return the CQL string for this object, i.e. typically the CQL used for creating statements.
|
public PreparedStatementHandler(com.datastax.oss.driver.api.core.cql.Statement<?> statement)
public com.datastax.oss.driver.api.core.cql.PreparedStatement createPreparedStatement(com.datastax.oss.driver.api.core.CqlSession session)
throws com.datastax.oss.driver.api.core.DriverException
PreparedStatementCreatorPreparedStatement.createPreparedStatement in interface PreparedStatementCreatorsession - CqlSession to use to create statement.com.datastax.oss.driver.api.core.DriverException - there is no need to catch DriverException that may be thrown in the implementation
of this method. The CqlTemplate class will handle them.public com.datastax.oss.driver.api.core.cql.BoundStatement bindValues(com.datastax.oss.driver.api.core.cql.PreparedStatement ps)
throws com.datastax.oss.driver.api.core.DriverException
PreparedStatementBinderPreparedStatement.bindValues in interface PreparedStatementBinderps - the PreparedStatement to invoke setter methods on.com.datastax.oss.driver.api.core.DriverException - if a DriverException is encountered (i.e. there is no need to catch
DriverException)public String getCql()
CqlProvidergetCql in interface CqlProviderCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.