|
DJDoc v.1.0.0b-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.djdoc.bo.HibernateUtils
public class HibernateUtils
The HibernateUtils
class is a utility class used for managing
the configuration and usage of the Hibernate framework.
Method Summary | |
---|---|
static void |
closeSession()
This method closes down the current Hibernate session. |
static org.hibernate.Session |
currentSession()
This method retrieves the current Hibernate session. |
static void |
delete(BusinessObject obj)
This method deletes an existing BusinessObject from the database. |
static void |
destroy()
This method completely shuts down the Hibernate connection with the database. |
static void |
save(BusinessObject obj)
This method is used to store a BusinessObject (which may be either
new or already existing) in the database. |
static void |
setup(java.util.Properties props)
This method is used for initializing the Hibernate framework. |
static void |
startSession()
This method is used to start a Hibernate session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setup(java.util.Properties props)
props
- The Properties
object holding the Hibernate
configuration settingspublic static void startSession()
public static org.hibernate.Session currentSession()
RuntimeException
is thrown.
public static void closeSession()
RuntimeException
is thrown.
public static void save(BusinessObject obj)
BusinessObject
(which may be either
new or already existing) in the database. It assumes that a Hibernate
session is currently running.
obj
- The BusinessObject
to be saved in the databasepublic static void delete(BusinessObject obj)
BusinessObject
from the database.
It assumes that a Hibernate session is already running.
obj
- The BusinessObject
to be deleted from the databasepublic static void destroy()
|
DJDoc v.1.0.0b-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |