@FunctionalInterface public interface PreparedStatementCreator
CqlTemplate class. This interface creates a
PreparedStatement given a session, provided by the CqlTemplate class. Implementations are responsible
for providing CQL and any necessary parameters.
Implementations do not need to concern themselves with DriverExceptions that may be thrown from
operations they attempt. The CqlTemplate class will catch and handle DriverExceptions appropriately.
CqlTemplate.execute(PreparedStatementCreator, PreparedStatementCallback),
CqlTemplate.query(PreparedStatementCreator, RowCallbackHandler)| Modifier and Type | Method and Description |
|---|---|
com.datastax.driver.core.PreparedStatement |
createPreparedStatement(com.datastax.driver.core.Session session)
Create a statement in this session.
|
com.datastax.driver.core.PreparedStatement createPreparedStatement(com.datastax.driver.core.Session session)
throws com.datastax.driver.core.exceptions.DriverException
PreparedStatement.session - Session to use to create statement.com.datastax.driver.core.exceptions.DriverException - there is no need to catch DriverException that may be thrown in the implementation
of this method. The CqlTemplate class will handle them.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.