Class BeanFactorySessionFactoryLookup

java.lang.Object
org.springframework.data.cassandra.core.cql.session.lookup.BeanFactorySessionFactoryLookup
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, SessionFactoryLookup

public class BeanFactorySessionFactoryLookup extends Object implements SessionFactoryLookup, org.springframework.beans.factory.BeanFactoryAware
SessionFactoryLookup implementation based on a Spring BeanFactory.

Will lookup Spring managed beans identified by bean name, expecting them to be of type SessionFactory.

Since:
2.0
Author:
Mark Paluch
See Also:
  • BeanFactory
  • Constructor Details

    • BeanFactorySessionFactoryLookup

      public BeanFactorySessionFactoryLookup()
      Create a new instance of BeanFactorySessionFactoryLookup.

      The BeanFactory to access must be set via setBeanFactory(BeanFactory).

      See Also:
    • BeanFactorySessionFactoryLookup

      public BeanFactorySessionFactoryLookup(org.springframework.beans.factory.BeanFactory beanFactory)
      Create a new instance of BeanFactorySessionFactoryLookup given BeanFactory.

      Use of this constructor is redundant if this object is being created by a Spring IoC container, as the supplied BeanFactory will be replaced by the BeanFactory that creates it (BeanFactoryAware contract). So only use this constructor if you are using this class outside the context of a Spring IoC container.

      Parameters:
      beanFactory - the bean factory to be used to lookup session factories, must not be null.
  • Method Details