SPT Core API

com.sptci.jdo
Class PersistenceManagerFactory

java.lang.Object
  extended by com.sptci.jdo.PersistenceManagerFactory

public final class PersistenceManagerFactory
extends Object

A factory for accessing instances of a JDO PersistenceManager that are necessary for interacting with the data store.

© Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: PersistenceManagerFactory.java 4856 2009-08-11 15:22:46Z rakesh $
Author:
Rakesh Vidyadharan 2006-02-05

Field Summary
static PersistenceManagerFactory pmf
          The singleton instance of this class.
 
Method Summary
protected  void close()
          Close the underlying persistence manager factory.
 javax.jdo.datastore.DataStoreCache getDataStoreCache()
          Return the DataStoreCache that may be used to control caching.
static PersistenceManagerFactory getInstance()
          Return the singleton instance of this class.
 javax.jdo.PersistenceManager getPersistenceManager()
          Return a PersistenceManager from the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pmf

public static final PersistenceManagerFactory pmf
The singleton instance of this class.

Method Detail

getInstance

public static PersistenceManagerFactory getInstance()
Return the singleton instance of this class.

Returns:
PersistenceManagerFactory The singleton instance

getPersistenceManager

public final javax.jdo.PersistenceManager getPersistenceManager()
                                                         throws javax.jdo.JDOException
Return a PersistenceManager from the factory.

Returns:
PersitenceManager A new instance of a PersistenceManager from the factory.
Throws:
javax.jdo.JDOException - If errors are encountered while fetching a new manager.

getDataStoreCache

public javax.jdo.datastore.DataStoreCache getDataStoreCache()
Return the DataStoreCache that may be used to control caching.

Returns:
DataStoreCache The cache manager.

close

protected void close()
Close the underlying persistence manager factory. Invoked from context listeners.

See Also:
JDOApplicationListener.close()

SPT Core API