Class SimplePreparedStatementCreator
java.lang.Object
org.springframework.data.cassandra.core.cql.SimplePreparedStatementCreator
- All Implemented Interfaces:
CqlProvider,PreparedStatementCreator
public class SimplePreparedStatementCreator
extends Object
implements PreparedStatementCreator, CqlProvider
Trivial implementation of
PreparedStatementCreator. This prepared statement creator simply prepares a
statement from the CQL string. Exposes the given CQL statement through CqlProvider.getCql(),- Author:
- David Webb, Mark Paluch
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePreparedStatementCreator(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Create aSimplePreparedStatementCreatorgivencql.Create aSimplePreparedStatementCreatorgivencql. -
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.cql.PreparedStatementcreatePreparedStatement(com.datastax.oss.driver.api.core.CqlSession session) Create a statement in this session.getCql()Return the CQL string for this object, i.e. typically the CQL used for creating statements.
-
Constructor Details
-
SimplePreparedStatementCreator
Create aSimplePreparedStatementCreatorgivencql.- Parameters:
cql- must not be null.
-
SimplePreparedStatementCreator
public SimplePreparedStatementCreator(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Create aSimplePreparedStatementCreatorgivencql.- Parameters:
statement- must not be null.- Since:
- 3.1
-
-
Method Details
-
createPreparedStatement
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 Description copied from interface:PreparedStatementCreatorCreate a statement in this session. Allows implementations to usePreparedStatement.- Specified by:
createPreparedStatementin interfacePreparedStatementCreator- Parameters:
session-CqlSessionto use to create statement.- Returns:
- a prepared statement.
- Throws:
com.datastax.oss.driver.api.core.DriverException- there is no need to catchDriverExceptionthat may be thrown in the implementation of this method. TheCqlTemplateclass will handle them.
-
getCql
Description copied from interface:CqlProviderReturn the CQL string for this object, i.e. typically the CQL used for creating statements.- Specified by:
getCqlin interfaceCqlProvider- Returns:
- the CQL string.
-