edu.northwestern.at.wordhoard.swing.calculator.modelutils
Class PMUtils

java.lang.Object
  extended by edu.northwestern.at.wordhoard.swing.calculator.modelutils.PMUtils

public class PMUtils
extends java.lang.Object

Persistence Manager utilities.


Field Summary
protected static boolean useWordHoardPM
          True to always use global WordHoard persistence manager.
 
Constructor Summary
protected PMUtils()
          Don't allow instantiation but do allow overrides.
 
Method Summary
static void closePM(PersistenceManager pm)
          Close persistence manager.
static PersistenceManager getPM()
          Get persistence manager.
static PersistentObject refreshObject(org.hibernate.Session session, PersistentObject obj)
          Refresh a persistent object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useWordHoardPM

protected static boolean useWordHoardPM
True to always use global WordHoard persistence manager.

Constructor Detail

PMUtils

protected PMUtils()
Don't allow instantiation but do allow overrides.

Method Detail

getPM

public static PersistenceManager getPM()
Get persistence manager.

Returns:
A persistence manager.

closePM

public static void closePM(PersistenceManager pm)
Close persistence manager.

Parameters:
pm - Persistence manager to close.

refreshObject

public static PersistentObject refreshObject(org.hibernate.Session session,
                                             PersistentObject obj)
Refresh a persistent object.

Parameters:
session - Session in which to refresh object.
obj - Persistent object to refresh.
Returns:
Refreshed persistent object.