public class SingleSessionFactoryLookup extends Object implements SessionFactoryLookup
SessionFactoryLookup that simply wraps a single given SessionFactory, returned
for any session factory name. Useful for testing or environments that provide only one SessionFactory.| Constructor and Description |
|---|
SingleSessionFactoryLookup(SessionFactory sessionFactory)
Create a new instance of
SingleSessionFactoryLookup given SessionFactory. |
| Modifier and Type | Method and Description |
|---|---|
SessionFactory |
getSessionFactory(String sessionFactoryName)
Implementations must implement this method to retrieve the
SessionFactory identified by the given name from
their backing store. |
public SingleSessionFactoryLookup(SessionFactory sessionFactory)
SingleSessionFactoryLookup given SessionFactory.sessionFactory - the single SessionFactory to wrap, must not be null.public SessionFactory getSessionFactory(String sessionFactoryName) throws SessionFactoryLookupFailureException
SessionFactoryLookupSessionFactory identified by the given name from
their backing store.getSessionFactory in interface SessionFactoryLookupsessionFactoryName - the name of the SessionFactory.SessionFactory (never null).SessionFactoryLookupFailureException - if the lookup failed.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.