public class CassandraTemplateFactoryBean extends Object implements FactoryBean<CassandraTemplate>, InitializingBean
CassandraTemplate
.Modifier and Type | Field and Description |
---|---|
protected CassandraConverter |
converter |
protected CqlOperations |
cqlOperations |
protected SessionFactory |
sessionFactory |
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
CassandraTemplateFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
CassandraTemplate |
getObject() |
Class<CassandraTemplate> |
getObjectType() |
boolean |
isSingleton() |
void |
setConverter(CassandraConverter converter)
Set the
CassandraConverter to use. |
void |
setCqlOperations(CqlOperations cqlOperations)
Sets the Cassandra
CqlOperations to use. |
void |
setSession(com.datastax.oss.driver.api.core.CqlSession session)
Sets the Cassandra
CqlSession to use. |
void |
setSessionFactory(SessionFactory sessionFactory)
Sets the Cassandra
SessionFactory to use. |
@Nullable protected SessionFactory sessionFactory
@Nullable protected CqlOperations cqlOperations
@Nullable protected CassandraConverter converter
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public CassandraTemplate getObject() throws Exception
getObject
in interface FactoryBean<CassandraTemplate>
Exception
public Class<CassandraTemplate> getObjectType()
getObjectType
in interface FactoryBean<CassandraTemplate>
public boolean isSingleton()
isSingleton
in interface FactoryBean<CassandraTemplate>
public void setSession(com.datastax.oss.driver.api.core.CqlSession session)
CqlSession
to use. The CassandraTemplate
will use the logged keyspace of the
underlying CqlSession
. Don't change the keyspace using CQL but use a SessionFactory
.session
- must not be null.public void setSessionFactory(SessionFactory sessionFactory)
SessionFactory
to use. The CassandraTemplate
will use the logged keyspace of the
underlying CqlSession
. Don't change the keyspace using CQL.sessionFactory
- must not be null.public void setCqlOperations(CqlOperations cqlOperations)
CqlOperations
to use. The CassandraTemplate
will use the logged keyspace of the
underlying CqlSession
. Don't change the keyspace using CQL but use
setSessionFactory(SessionFactory)
.cqlOperations
- must not be null.public void setConverter(CassandraConverter converter)
CassandraConverter
to use.converter
- must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.