Class CassandraCqlTemplateFactoryBean
java.lang.Object
org.springframework.data.cassandra.config.CassandraCqlTemplateFactoryBean
- All Implemented Interfaces:
FactoryBean<CqlTemplate>,InitializingBean
public class CassandraCqlTemplateFactoryBean
extends Object
implements FactoryBean<CqlTemplate>, InitializingBean
Factory for configuring a
CqlTemplate.- Author:
- Matthew T. Adams, Mark Paluch
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidsetSession(com.datastax.oss.driver.api.core.CqlSession session) Sets the CassandraCqlSessionto use.voidsetSessionFactory(SessionFactory sessionFactory) Sets the CassandraSessionFactoryto use.
-
Constructor Details
-
CassandraCqlTemplateFactoryBean
public CassandraCqlTemplateFactoryBean()
-
-
Method Details
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<CqlTemplate>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<CqlTemplate>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceFactoryBean<CqlTemplate>
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Throws:
Exception
-
setSession
public void setSession(com.datastax.oss.driver.api.core.CqlSession session) Sets the CassandraCqlSessionto use. TheCqlTemplatewill use the logged keyspace of the underlyingCqlSession. Don't change the keyspace using CQL but use multipleCqlSessionandCqlTemplatebeans.- Parameters:
session- must not be null.
-
setSessionFactory
Sets the CassandraSessionFactoryto use. TheCqlTemplatewill use the logged keyspace of the underlyingSessionFactory. Don't change the keyspace using CQL but use an appropriateSessionFactory.- Parameters:
sessionFactory- must not be null.- See Also:
-