Class CassandraTemplate
- All Implemented Interfaces:
Aware,ApplicationContextAware,ApplicationEventPublisherAware,CassandraOperations,ExecutableDeleteOperation,ExecutableInsertOperation,ExecutableSelectOperation,ExecutableUpdateOperation,FluentCassandraOperations
- Direct Known Subclasses:
CassandraAdminTemplate
CassandraOperations. It simplifies the use of Cassandra usage and helps to avoid
common errors. It executes core Cassandra workflow. This class executes CQL queries or updates, initiating iteration
over ResultSet and catching Cassandra exceptions and translating them to the generic, more informative
exception hierarchy defined in the org.springframework.dao package.
Can be used within a service implementation via direct instantiation with a CqlSession reference, or get
prepared in an application context and given to services as bean reference.
This class supports the use of prepared statements when enabling setUsePreparedStatements(boolean). All
statements created by methods of this class (such as select(Query, Class) or
update(Query, org.springframework.data.cassandra.core.query.Update, Class) will be executed as prepared
statements. Also, statements accepted by methods (such as select(String, Class) or
and others) will be prepared prior to execution. Note that Statement
objects passed to methods must be SimpleStatement so that these can be prepared.
Note: The CqlSession should always be configured as a bean in the application context, in the first case
given to the service directly, in the second case to the prepared template.
- Since:
- 2.0
- Author:
- Mark Paluch, John Blum, Lukasz Antoniak, Sam Lightfoot
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUtility class to prepare aSimpleStatementand bind values associated with the statement to aBoundStatement.Nested classes/interfaces inherited from interface org.springframework.data.cassandra.core.ExecutableDeleteOperation
ExecutableDeleteOperation.DeleteWithQuery, ExecutableDeleteOperation.DeleteWithTable, ExecutableDeleteOperation.ExecutableDelete, ExecutableDeleteOperation.TerminatingDeleteNested classes/interfaces inherited from interface org.springframework.data.cassandra.core.ExecutableInsertOperation
ExecutableInsertOperation.ExecutableInsert<T>, ExecutableInsertOperation.InsertWithOptions<T>, ExecutableInsertOperation.InsertWithTable<T>, ExecutableInsertOperation.TerminatingInsert<T>Nested classes/interfaces inherited from interface org.springframework.data.cassandra.core.ExecutableSelectOperation
ExecutableSelectOperation.ExecutableSelect<T>, ExecutableSelectOperation.SelectWithProjection<T>, ExecutableSelectOperation.SelectWithQuery<T>, ExecutableSelectOperation.SelectWithTable<T>, ExecutableSelectOperation.TerminatingSelect<T>Nested classes/interfaces inherited from interface org.springframework.data.cassandra.core.ExecutableUpdateOperation
ExecutableUpdateOperation.ExecutableUpdate, ExecutableUpdateOperation.TerminatingUpdate, ExecutableUpdateOperation.UpdateWithQuery, ExecutableUpdateOperation.UpdateWithTable -
Constructor Summary
ConstructorsConstructorDescriptionCassandraTemplate(com.datastax.oss.driver.api.core.CqlSession session) Creates an instance ofCassandraTemplateinitialized with the givenCqlSessionand a defaultMappingCassandraConverter.CassandraTemplate(com.datastax.oss.driver.api.core.CqlSession session, CassandraConverter converter) Creates an instance ofCassandraTemplateinitialized with the givenCqlSessionandCassandraConverter.CassandraTemplate(CqlOperations cqlOperations, CassandraConverter converter) Creates an instance ofCassandraTemplateinitialized with the givenCqlOperationsandCassandraConverter.CassandraTemplate(SessionFactory sessionFactory, CassandraConverter converter) Creates an instance ofCassandraTemplateinitialized with the givenSessionFactoryandCassandraConverter. -
Method Summary
Modifier and TypeMethodDescriptionbatchOps(com.datastax.oss.driver.api.core.cql.BatchType batchType) Returns a newCassandraBatchOperations.longReturns the number of rows for the given entity class.longReturns the number of rows for the given entity class applyingQuery.createPreparedStatementHandler(com.datastax.oss.driver.api.core.cql.Statement<?> statement) Create a new statement-basedCassandraTemplate.PreparedStatementHandlerusing the statement passed in.Begin creating aDELETEoperation for the givendomainType.voidDelete the given entity and return the entity if the delete statement was applied.delete(Object entity, QueryOptions options) Delete the given entity applyingQueryOptionsand return the entity if the delete statement was applied.booleanRemove entities (rows)/columns from the table byQuery.booleandeleteById(Object id, Class<?> entityClass) Remove the given object from the table by id.com.datastax.oss.driver.api.core.cql.ResultSetexecute(com.datastax.oss.driver.api.core.cql.Statement<?> statement) Execute the given CassandraStatement.booleanDetermine whether a row ofentityClasswith the givenidexists.booleanDetermine whether the result forentityClassQueryyields at least one row.Returns the underlyingCassandraConverter.Expose the underlyingCqlOperationsto allow CQL operations.protected org.springframework.data.cassandra.core.EntityOperationsReturns theEntityOperationsused to perform data access operations on an entity inside a Cassandra data source.protected SpelAwareProxyProjectionFactoryDeprecated.protected StatementFactoryReturns theStatementFactoryused by this template to construct and run Cassandra CQL statements.com.datastax.oss.driver.api.core.CqlIdentifiergetTableName(Class<?> entityClass) The table name used for the specified class by this template.Begin creating anINSERToperation for givendomainType.<T> Tinsert(T entity) Insert the given entity and return the entity if the insert was applied.<T> EntityWriteResult<T>insert(T entity, InsertOptions options) Insert the given entity applyingWriteOptionsand return the entity if the insert was applied.booleanReturns whether this instance is configured to useprepared statements.protected <T> TmaybeCallBeforeConvert(T object, com.datastax.oss.driver.api.core.CqlIdentifier tableName) protected <T> TmaybeCallBeforeSave(T object, com.datastax.oss.driver.api.core.CqlIdentifier tableName, com.datastax.oss.driver.api.core.cql.Statement<?> statement) protected <E extends CassandraMappingEvent<T>,T>
voidmaybeEmitEvent(Supplier<E> event) Begin creating a CassandraSELECTquery operation for the givendomainType.<T> List<T>Execute aSELECTquery and convert the resulting items to aListof entities.<T> List<T>Execute aSELECTquery and convert the resulting items to aListof entities.<T> List<T>Execute aSELECTquery and convert the resulting items to aListof entities.<T> TExecute aSELECTquery and convert the resulting item to an entity.<T> TExecute aSELECTquery and convert the resulting item to an entity.<T> TExecute aSELECTquery and convert the resulting item to an entity.<T> TselectOneById(Object id, Class<T> entityClass) Execute the Select byidfor the givenentityClass.voidsetApplicationContext(ApplicationContext applicationContext) voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) voidsetEntityCallbacks(EntityCallbacks entityCallbacks) ConfigureEntityCallbacksto pre-/post-process entities during persistence operations.voidsetEntityLifecycleEventsEnabled(boolean enabled) Configure whether lifecycle events such asAfterLoadEvent,BeforeSaveEvent, etc. should be published or whether emission should be suppressed.voidsetUsePreparedStatements(boolean usePreparedStatements) Enable/disableprepared statementsusage.<T> Slice<T>Execute aSELECTquery with paging and convert the result set to aSliceof entities.<T> Slice<T>Execute aSELECTquery with paging and convert the result set to aSliceof entities.<T> Stream<T>Execute aSELECTquery and convert the resulting items to aIteratorof entities.<T> Stream<T>Execute aSELECTquery and convert the resulting items to aIteratorof entities.<T> Stream<T>Execute aSELECTquery and convert the resulting items to aIteratorof entities.voidExecute aTRUNCATEquery to remove all entities of a given class.Begin creating anUPDATEoperation for the givendomainType.booleanUpdate the queried entities and return true if the update was applied.<T> Tupdate(T entity) Update the given entity and return the entity if the update was applied.<T> EntityWriteResult<T>update(T entity, UpdateOptions options) Update the given entity applyingWriteOptionsand return the entity if the update was applied.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.cassandra.core.CassandraOperations
batchOps, delete
-
Constructor Details
-
CassandraTemplate
public CassandraTemplate(com.datastax.oss.driver.api.core.CqlSession session) Creates an instance ofCassandraTemplateinitialized with the givenCqlSessionand a defaultMappingCassandraConverter.- Parameters:
session-CqlSessionused to interact with Cassandra; must not be null.- See Also:
-
CassandraConverterCqlSession
-
CassandraTemplate
public CassandraTemplate(com.datastax.oss.driver.api.core.CqlSession session, CassandraConverter converter) Creates an instance ofCassandraTemplateinitialized with the givenCqlSessionandCassandraConverter.- Parameters:
session-CqlSessionused to interact with Cassandra; must not be null.converter-CassandraConverterused to convert between Java and Cassandra types; must not be null.- See Also:
-
CassandraConverterCqlSession
-
CassandraTemplate
Creates an instance ofCassandraTemplateinitialized with the givenSessionFactoryandCassandraConverter.- Parameters:
sessionFactory-SessionFactoryused to interact with Cassandra; must not be null.converter-CassandraConverterused to convert between Java and Cassandra types; must not be null.- See Also:
-
CassandraTemplate
Creates an instance ofCassandraTemplateinitialized with the givenCqlOperationsandCassandraConverter.- Parameters:
cqlOperations-CqlOperationsused to interact with Cassandra; must not be null.converter-CassandraConverterused to convert between Java and Cassandra types; must not be null.- See Also:
-
CassandraConverterCqlSession
-
-
Method Details
-
batchOps
Description copied from interface:CassandraOperationsReturns a newCassandraBatchOperations. EachCassandraBatchOperationsinstance can be executed only once, so you need to obtain newCassandraBatchOperationsinstances for each batch.- Specified by:
batchOpsin interfaceCassandraOperations- Parameters:
batchType- must not be null.- Returns:
- a new
ReactiveCassandraBatchOperationsassociated with the given entity class.
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
setEntityCallbacks
ConfigureEntityCallbacksto pre-/post-process entities during persistence operations.- Parameters:
entityCallbacks-
-
setEntityLifecycleEventsEnabled
public void setEntityLifecycleEventsEnabled(boolean enabled) Configure whether lifecycle events such asAfterLoadEvent,BeforeSaveEvent, etc. should be published or whether emission should be suppressed. Enabled by default.- Parameters:
enabled-trueto enable entity lifecycle events;falseto disable entity lifecycle events.- Since:
- 4.0
- See Also:
-
getCqlOperations
Description copied from interface:CassandraOperationsExpose the underlyingCqlOperationsto allow CQL operations.- Specified by:
getCqlOperationsin interfaceCassandraOperations- Returns:
- the underlying
CqlOperations. - See Also:
-
getConverter
Description copied from interface:CassandraOperationsReturns the underlyingCassandraConverter.- Specified by:
getConverterin interfaceCassandraOperations- Returns:
- the underlying
CassandraConverter.
-
isUsePreparedStatements
public boolean isUsePreparedStatements()Returns whether this instance is configured to useprepared statements. If enabled (default), then all persistence methods (such asselect(java.lang.String, java.lang.Class<T>),update(org.springframework.data.cassandra.core.query.Query, org.springframework.data.cassandra.core.query.Update, java.lang.Class<?>), and others) will make use of prepared statements. Note that methods accepting aStatementmust be called withSimpleStatementinstances to participate in statement preparation.- Returns:
- true if prepared statements usage is enabled; false otherwise.
- Since:
- 3.2
-
setUsePreparedStatements
public void setUsePreparedStatements(boolean usePreparedStatements) Enable/disableprepared statementsusage. If enabled (default), then all persistence methods (such asselect(java.lang.String, java.lang.Class<T>),update(org.springframework.data.cassandra.core.query.Query, org.springframework.data.cassandra.core.query.Update, java.lang.Class<?>), and others) will make use of prepared statements. Note that methods accepting aStatementmust be called withSimpleStatementinstances to participate in statement preparation.- Parameters:
usePreparedStatements- whether to use prepared statements.- Since:
- 3.2
-
getEntityOperations
protected org.springframework.data.cassandra.core.EntityOperations getEntityOperations()Returns theEntityOperationsused to perform data access operations on an entity inside a Cassandra data source.- Returns:
- the configured
EntityOperationsfor this template. - See Also:
-
EntityOperations
-
getProjectionFactory
Deprecated.since 3.4, useCassandraConverter.getProjectionFactory()instead.Returns a reference to the configuredProjectionFactoryused by this template to process CQL query projections.- Returns:
- a reference to the configured
ProjectionFactoryused by this template to process CQL query projections. - Since:
- 2.1
- See Also:
-
getStatementFactory
Returns theStatementFactoryused by this template to construct and run Cassandra CQL statements.- Returns:
- the
StatementFactoryused by this template to construct and run Cassandra CQL statements. - Since:
- 2.1
- See Also:
-
getTableName
Description copied from interface:CassandraOperationsThe table name used for the specified class by this template.- Specified by:
getTableNamein interfaceCassandraOperations- Parameters:
entityClass- The entity type must not be null.- Returns:
- the
CqlIdentifier
-
select
Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting items to aListof entities.- Specified by:
selectin interfaceCassandraOperations- Parameters:
cql- must not be null.entityClass- The entity type must not be null.- Returns:
- the converted results
-
selectOne
Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting item to an entity.- Specified by:
selectOnein interfaceCassandraOperations- Parameters:
cql- must not be null.entityClass- The entity type must not be null.- Returns:
- the converted object or null.
-
stream
Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting items to aIteratorof entities.Returns a
Iteratorthat wraps the CassandraResultSet.- Specified by:
streamin interfaceCassandraOperations- Type Parameters:
T- element return type.- Parameters:
cql- query to execute. Must not be empty or null.entityClass- Class type of the elements in theIteratorstream. Must not be null.- Returns:
- an
Iterator(stream) over the elements in the query result set. - Throws:
DataAccessException- if there is any problem executing the query.
-
execute
public com.datastax.oss.driver.api.core.cql.ResultSet execute(com.datastax.oss.driver.api.core.cql.Statement<?> statement) Description copied from interface:CassandraOperationsExecute the given CassandraStatement. Any errors that result from executing this command will be converted into Spring's DAO exception hierarchy.- Specified by:
executein interfaceCassandraOperations- Parameters:
statement- a CassandraStatement, must not be null.- Returns:
- the
ResultSet.
-
select
public <T> List<T> select(com.datastax.oss.driver.api.core.cql.Statement<?> statement, Class<T> entityClass) Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting items to aListof entities.- Specified by:
selectin interfaceCassandraOperations- Parameters:
statement- must not be null.entityClass- The entity type must not be null.- Returns:
- the converted results
-
selectOne
public <T> T selectOne(com.datastax.oss.driver.api.core.cql.Statement<?> statement, Class<T> entityClass) Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting item to an entity.- Specified by:
selectOnein interfaceCassandraOperations- Parameters:
statement- must not be null.entityClass- The entity type must not be null.- Returns:
- the converted object or null.
-
slice
public <T> Slice<T> slice(com.datastax.oss.driver.api.core.cql.Statement<?> statement, Class<T> entityClass) Description copied from interface:CassandraOperationsExecute aSELECTquery with paging and convert the result set to aSliceof entities. A sliced query translates the effectivefetch sizeto the page size.- Specified by:
slicein interfaceCassandraOperations- Parameters:
statement- the CQL statement, must not be null.entityClass- The entity type must not be null.- Returns:
- the converted results
-
stream
public <T> Stream<T> stream(com.datastax.oss.driver.api.core.cql.Statement<?> statement, Class<T> entityClass) throws DataAccessException Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting items to aIteratorof entities.Returns a
Iteratorthat wraps the CassandraResultSet.- Specified by:
streamin interfaceCassandraOperations- Type Parameters:
T- element return type.- Parameters:
statement- query to execute. Must not be empty or null.entityClass- Class type of the elements in theIteratorstream. Must not be null.- Returns:
- an
Iterator(stream) over the elements in the query result set. - Throws:
DataAccessException- if there is any problem executing the query.
-
select
Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting items to aListof entities.- Specified by:
selectin interfaceCassandraOperations- Parameters:
query- must not be null.entityClass- The entity type must not be null.- Returns:
- the converted results
- Throws:
DataAccessException- if there is any problem executing the query.
-
selectOne
Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting item to an entity.- Specified by:
selectOnein interfaceCassandraOperations- Parameters:
query- must not be null.entityClass- The entity type must not be null.- Returns:
- the converted object or null.
- Throws:
DataAccessException- if there is any problem executing the query.
-
slice
Description copied from interface:CassandraOperationsExecute aSELECTquery with paging and convert the result set to aSliceof entities.- Specified by:
slicein interfaceCassandraOperations- Parameters:
query- the query object used to create a CQL statement, must not be null.entityClass- The entity type must not be null.- Returns:
- the converted results
- Throws:
DataAccessException- if there is any problem executing the query.- See Also:
-
stream
Description copied from interface:CassandraOperationsExecute aSELECTquery and convert the resulting items to aIteratorof entities.Returns a
Iteratorthat wraps the CassandraResultSet.- Specified by:
streamin interfaceCassandraOperations- Type Parameters:
T- element return type.- Parameters:
query- query to execute. Must not be empty or null.entityClass- Class type of the elements in theIteratorstream. Must not be null.- Returns:
- an
Iterator(stream) over the elements in the query result set. - Throws:
DataAccessException- if there is any problem executing the query.
-
update
Description copied from interface:CassandraOperationsUpdate the queried entities and return true if the update was applied.- Specified by:
updatein interfaceCassandraOperations- Parameters:
query- must not be null.update- must not be null.entityClass- The entity type must not be null.- Throws:
DataAccessException- if there is any problem executing the query.
-
delete
Description copied from interface:CassandraOperationsRemove entities (rows)/columns from the table byQuery.- Specified by:
deletein interfaceCassandraOperations- Parameters:
query- must not be null.entityClass- The entity type must not be null.- Throws:
DataAccessException- if there is any problem executing the query.
-
count
Description copied from interface:CassandraOperationsReturns the number of rows for the given entity class.- Specified by:
countin interfaceCassandraOperations- Parameters:
entityClass-typeof the entity; must not be null.- Returns:
- the number of existing entities.
-
count
Description copied from interface:CassandraOperationsReturns the number of rows for the given entity class applyingQuery. This overridden method allows users to further refine the selection criteria using aQuerypredicate to determine how many entities of the giventypematch the criteria.- Specified by:
countin interfaceCassandraOperations- Parameters:
query- user-defined countQueryto execute; must not be null.entityClass-typeof the entity; must not be null.- Returns:
- the number of existing entities.
- Throws:
DataAccessException- if any problem occurs while executing the query.
-
exists
Description copied from interface:CassandraOperationsDetermine whether a row ofentityClasswith the givenidexists.- Specified by:
existsin interfaceCassandraOperations- Parameters:
id- Id value. For single primary keys it's the plain value. For composite primary keys either, it's an instance of eitherPrimaryKeyClassorMapId. Must not be null.entityClass-typeof the entity; must not be null.- Returns:
- true if the object exists.
-
exists
Description copied from interface:CassandraOperationsDetermine whether the result forentityClassQueryyields at least one row.- Specified by:
existsin interfaceCassandraOperations- Parameters:
query- user-defined existsQueryto execute; must not be null.entityClass-typeof the entity; must not be null.- Returns:
- true if the object exists.
- Throws:
DataAccessException- if any problem occurs while executing the query.
-
selectOneById
Description copied from interface:CassandraOperationsExecute the Select byidfor the givenentityClass.- Specified by:
selectOneByIdin interfaceCassandraOperations- Parameters:
id- the Id value. For single primary keys it's the plain value. For composite primary keys either thePrimaryKeyClassorMapId. Must not be null.entityClass- The entity type must not be null.- Returns:
- the converted object or null.
-
insert
public <T> T insert(T entity) Description copied from interface:CassandraOperationsInsert the given entity and return the entity if the insert was applied.- Specified by:
insertin interfaceCassandraOperations- Parameters:
entity- The entity to insert, must not be null.- Returns:
- the inserted entity.
-
insert
Description copied from interface:CassandraOperationsInsert the given entity applyingWriteOptionsand return the entity if the insert was applied.- Specified by:
insertin interfaceCassandraOperations- Parameters:
entity- The entity to insert, must not be null.options- must not be null.- Returns:
- the
EntityWriteResultfor this operation. - See Also:
-
update
public <T> T update(T entity) Description copied from interface:CassandraOperationsUpdate the given entity and return the entity if the update was applied.- Specified by:
updatein interfaceCassandraOperations- Parameters:
entity- The entity to update, must not be null.- Returns:
- the updated entity.
-
update
Description copied from interface:CassandraOperationsUpdate the given entity applyingWriteOptionsand return the entity if the update was applied.- Specified by:
updatein interfaceCassandraOperations- Parameters:
entity- The entity to update, must not be null.options- must not be null.- Returns:
- the
EntityWriteResultfor this operation. - See Also:
-
delete
Description copied from interface:CassandraOperationsDelete the given entity and return the entity if the delete statement was applied.- Specified by:
deletein interfaceCassandraOperations- Parameters:
entity- must not be null.
-
delete
Description copied from interface:CassandraOperationsDelete the given entity applyingQueryOptionsand return the entity if the delete statement was applied.- Specified by:
deletein interfaceCassandraOperations- Parameters:
entity- must not be null.options- must not be null.- Returns:
- the
WriteResultfor this operation. - See Also:
-
deleteById
Description copied from interface:CassandraOperationsRemove the given object from the table by id.- Specified by:
deleteByIdin interfaceCassandraOperations- Parameters:
id- the Id value. For single primary keys it's the plain value. For composite primary keys either thePrimaryKeyClassorMapId. Must not be null.entityClass- The entity type must not be null.
-
truncate
Description copied from interface:CassandraOperationsExecute aTRUNCATEquery to remove all entities of a given class.- Specified by:
truncatein interfaceCassandraOperations- Parameters:
entityClass- The entity type must not be null.
-
query
Description copied from interface:ExecutableSelectOperationBegin creating a CassandraSELECTquery operation for the givendomainType.- Specified by:
queryin interfaceExecutableSelectOperation- Type Parameters:
T-typeof the application domain object.- Parameters:
domainType-typeto domain object to query; must not be null.- Returns:
- new instance of
ExecutableSelectOperation.ExecutableSelect. - See Also:
-
insert
Description copied from interface:ExecutableInsertOperationBegin creating anINSERToperation for givendomainType.- Specified by:
insertin interfaceExecutableInsertOperation- Parameters:
domainType-typeof domain object to insert; must not be null.- Returns:
- new instance of
ExecutableInsertOperation.ExecutableInsert. - See Also:
-
update
Description copied from interface:ExecutableUpdateOperationBegin creating anUPDATEoperation for the givendomainType.- Specified by:
updatein interfaceExecutableUpdateOperation- Parameters:
domainType-typeof domain object to update; must not be null.- Returns:
- new instance of
ExecutableUpdateOperation.ExecutableUpdate.
-
delete
Description copied from interface:ExecutableDeleteOperationBegin creating aDELETEoperation for the givendomainType.- Specified by:
deletein interfaceExecutableDeleteOperation- Parameters:
domainType-typeof domain object to delete; must not be null.- Returns:
- new instance of
ExecutableDeleteOperation.ExecutableDelete. - See Also:
-
createPreparedStatementHandler
protected CassandraTemplate.PreparedStatementHandler createPreparedStatementHandler(com.datastax.oss.driver.api.core.cql.Statement<?> statement) Create a new statement-basedCassandraTemplate.PreparedStatementHandlerusing the statement passed in.This method allows for the creation to be overridden by subclasses.
- Parameters:
statement- the statement to be prepared.- Returns:
- the new
CassandraTemplate.PreparedStatementHandlerto use. - Since:
- 3.3.3
-
maybeEmitEvent
-
maybeCallBeforeConvert
protected <T> T maybeCallBeforeConvert(T object, com.datastax.oss.driver.api.core.CqlIdentifier tableName) -
maybeCallBeforeSave
protected <T> T maybeCallBeforeSave(T object, com.datastax.oss.driver.api.core.CqlIdentifier tableName, com.datastax.oss.driver.api.core.cql.Statement<?> statement)
-
CassandraConverter.getProjectionFactory()instead.