com.atlassian.bamboo.persistence3
Interface PluginHibernateSessionFactory

All Known Implementing Classes:
SpringPluginHibernateSessionFactory

public interface PluginHibernateSessionFactory

A factory to access the current Hibernate session. This is a simplified session factory that allow plugins to access correctly configured sessions from the host application (Confluence).


Method Summary
 net.sf.hibernate.Session getSession()
          Gets the current Hibernate session, will not create a new one if not exists.
 net.sf.hibernate.Session getSession(boolean createIfNeeded)
          Gets the current Hibernate session.
 

Method Detail

getSession

@NotNull
net.sf.hibernate.Session getSession()
Gets the current Hibernate session, will not create a new one if not exists.

Returns:
the current Hibernate session

getSession

@NotNull
net.sf.hibernate.Session getSession(boolean createIfNeeded)
Gets the current Hibernate session.

Parameters:
createIfNeeded - whether create a new session if needed
Returns:
the current Hibernate session


Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.