1
2 package com.pnpconsult.zeiterfassung.helper;
3
4 import jface.util.factory.FactoryException;
5 import jface.util.factory.ObjectManager;
6 import jface.util.factory.Singleton;
7 import net.sf.hibernate.HibernateException;
8 import net.sf.hibernate.Session;
9
10 /***
11 * @deprecated
12 *
13 * @author <a href="mailto:powerpete@users.sf.net">M. Petersen</a>
14 * @version $Id: SessionManager.java,v 1.4 2004/06/24 20:54:18 powerpete Exp $
15 */
16 public interface SessionManager extends Singleton
17 {
18 Class DEFAULT_IMPL = SessionManagerImpl.class;
19
20 /***
21 * The factory that can be used to load the {@link SessionManager}
22 * instance.
23 *
24 * @author <a href="mailto:powerpete@users.sf.net">M. Petersen</a>
25 * @version $Id: SessionManager.java,v 1.4 2004/06/24 20:54:18 powerpete Exp $
26 */
27 public static final class Factory
28 {
29 /***
30 * Returns the {@link SessionManager} instance.
31 *
32 * @return The {@link SessionManager} instance.
33 *
34 * @throws FactoryException If the instance could not be created.
35 */
36 public static final SessionManager getInstance() throws FactoryException
37 {
38 return (SessionManager) ObjectManager.getInstance(
39 SessionManager.class);
40 }
41 }
42
43 Session openSession() throws HibernateException;
44 }