|
From: Greg R. <gr...@us...> - 2004-04-06 23:02:43
|
Update of /cvsroot/jgatms/jgatms-core/src/prod/inklings/jgatms/context In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2862/src/prod/inklings/jgatms/context Modified Files: JgatmsContext.java Log Message: Added keys for AddMember and GetSkillLevels commands Index: JgatmsContext.java =================================================================== RCS file: /cvsroot/jgatms/jgatms-core/src/prod/inklings/jgatms/context/JgatmsContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JgatmsContext.java 1 Apr 2004 23:01:01 -0000 1.1 --- JgatmsContext.java 6 Apr 2004 22:49:50 -0000 1.2 *************** *** 4,7 **** --- 4,10 ---- import org.apache.commons.chain.impl.ContextBase; + import net.sf.hibernate.Session; + import net.sf.hibernate.SessionFactory; + import inklings.jgatms.bean.Member; import inklings.jgatms.ContextKeys; *************** *** 42,44 **** --- 45,75 ---- put(ContextKeys.DISPATCH_KEY, dispatch); } + + /** + * Returns the Hibernate SessionFactory. + */ + public SessionFactory getSessionFactory() { + return (SessionFactory) get(ContextKeys.HIBERNATE_SESSION_FACTORY_KEY); + } + + /** + * Sets the Hibernate SessionFactory. + */ + public void setSessionFactory(SessionFactory sessionFactory) { + put(ContextKeys.HIBERNATE_SESSION_FACTORY_KEY, sessionFactory); + } + + /** + * Returns the Hibernate session. + */ + public Session getSession() { + return (Session) get(ContextKeys.HIBERNATE_SESSION_KEY); + } + + /** + * Sest the Hibernate session. + */ + public void setSession(Session session) { + put(ContextKeys.HIBERNATE_SESSION_KEY, session); + } } |