public class CassandraCqlTemplateFactoryBean extends Object implements FactoryBean<CqlTemplate>, InitializingBean
CqlTemplate
.OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
CassandraCqlTemplateFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
CqlTemplate |
getObject() |
Class<CqlTemplate> |
getObjectType() |
boolean |
isSingleton() |
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. |
public CqlTemplate getObject()
getObject
in interface FactoryBean<CqlTemplate>
public Class<CqlTemplate> getObjectType()
getObjectType
in interface FactoryBean<CqlTemplate>
public boolean isSingleton()
isSingleton
in interface FactoryBean<CqlTemplate>
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void setSession(com.datastax.oss.driver.api.core.CqlSession session)
CqlSession
to use. The CqlTemplate
will use the logged keyspace of the
underlying CqlSession
. Don't change the keyspace using CQL but use multiple CqlSession
and
CqlTemplate
beans.session
- must not be null.public void setSessionFactory(SessionFactory sessionFactory)
SessionFactory
to use. The CqlTemplate
will use the logged keyspace of the
underlying SessionFactory
. Don't change the keyspace using CQL but use an appropriate
SessionFactory
.sessionFactory
- must not be null.SessionFactory
,
AbstractRoutingSessionFactory
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.