com.force.sdk.jdo
Class ForceJDOPersistenceManagerFactory

java.lang.Object
  extended by org.datanucleus.ObjectManagerFactoryImpl
      extended by org.datanucleus.jdo.JDOPersistenceManagerFactory
          extended by com.force.sdk.jdo.ForceJDOPersistenceManagerFactory
All Implemented Interfaces:
Serializable, javax.jdo.PersistenceManagerFactory, Referenceable, ObjectFactory

public class ForceJDOPersistenceManagerFactory
extends org.datanucleus.jdo.JDOPersistenceManagerFactory

Factory for the JDOPersistenceManager. Overriding so we can provide our own PersistenceManager

Author:
Fiaz Hossain
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.datanucleus.jdo.JDOPersistenceManagerFactory
lifecycleListeners, LOCALISER_JDO
 
Fields inherited from class org.datanucleus.ObjectManagerFactoryImpl
LOCALISER, omfContext
 
Constructor Summary
ForceJDOPersistenceManagerFactory()
          Default factory constructor.
ForceJDOPersistenceManagerFactory(Map props)
          Factory constructor that takes in a set of overriding properties.
 
Method Summary
protected static ForceJDOPersistenceManagerFactory createPersistenceManagerFactory(Map props)
          Convenience method to create the PMF, check whether we should hand out a singleton, and if all ok then freeze it for use.
static javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory(Map overridingProps)
          Return a new PersistenceManagerFactory with options set according to the given Properties.
protected  org.datanucleus.jdo.JDOPersistenceManager newPM(org.datanucleus.jdo.JDOPersistenceManagerFactory jdoPmf, String userName, String password)
          Construct a JDOPersistenceManager.
 
Methods inherited from class org.datanucleus.jdo.JDOPersistenceManagerFactory
addFetchGroups, addInstanceLifecycleListener, addSequenceForFactoryClass, assertConfigurable, assertIsOpen, assertLifecycleListenersConfigurable, beginTransactionForPersistenceManager, close, equals, freezeConfiguration, getCatalog, getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionPassword, getConnectionURL, getConnectionUserName, getCopyOnAttach, getDataStoreCache, getDatastoreReadTimeoutMillis, getDatastoreWriteTimeoutMillis, getDetachAllOnCommit, getFetchGroup, getFetchGroups, getIgnoreCache, getLifecycleListenerSpecifications, getManagedClasses, getMapping, getMetadata, getMultithreaded, getName, getNontransactionalRead, getNontransactionalWrite, getObjectInstance, getOptimistic, getPersistenceManager, getPersistenceManager, getPersistenceManagerFactory, getPersistenceManagerFactory, getPersistenceManagerProxy, getPersistenceProperties, getPersistenceUnitName, getPersistenceXmlFilename, getPrimaryClassLoader, getProperties, getQueryCache, getQueryDatastoreCompilationCache, getQueryGenericCompilationCache, getReadOnly, getReference, getRestoreValues, getRetainValues, getSchema, getSequenceForFactoryClass, getServerTimeZoneID, getTransactionIsolationLevel, getTransactionType, initialiseProperties, isClosed, newMetadata, registerMetadata, releasePersistenceManager, removeAllFetchGroups, removeFetchGroups, removeInstanceLifecycleListener, setCatalog, setConnectionDriverName, setConnectionFactory, setConnectionFactory2, setConnectionFactory2Name, setConnectionFactoryName, setConnectionPassword, setConnectionURL, setConnectionUserName, setCopyOnAttach, setDatastoreReadTimeoutMillis, setDatastoreWriteTimeoutMillis, setDetachAllOnCommit, setIgnoreCache, setMapping, setMultithreaded, setName, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setPersistenceProperties, setPersistenceUnitName, setPersistenceXmlFilename, setPrimaryClassLoader, setReadOnly, setRestoreValues, setRetainValues, setSchema, setServerTimeZoneID, setTransactionIsolationLevel, setTransactionType, supportedOptions
 
Methods inherited from class org.datanucleus.ObjectManagerFactoryImpl
addInternalFetchGroup, createInternalFetchGroup, getConfiguration, getFetchGroupManager, getFetchGroupsWithName, getInternalFetchGroup, getLevel2Cache, getOMFContext, getStoreManager, getVersionNumber, hasLevel2Cache, initialiseOMFContext, initialiseStoreManager, isConfigurable, logConfiguration, removeInternalFetchGroup, setIsNotConfigurable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForceJDOPersistenceManagerFactory

public ForceJDOPersistenceManagerFactory()
Default factory constructor.


ForceJDOPersistenceManagerFactory

public ForceJDOPersistenceManagerFactory(Map props)
Factory constructor that takes in a set of overriding properties.

Parameters:
props - Persistent properties
Method Detail

getPersistenceManagerFactory

public static javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory(Map overridingProps)
Return a new PersistenceManagerFactory with options set according to the given Properties.

Parameters:
overridingProps - The Map of properties to initialize the PersistenceManagerFactory with.
Returns:
A PersistenceManagerFactory with options set according to the given Properties.
See Also:
JDOHelper.getPersistenceManagerFactory(java.util.Map)

createPersistenceManagerFactory

protected static ForceJDOPersistenceManagerFactory createPersistenceManagerFactory(Map props)
Convenience method to create the PMF, check whether we should hand out a singleton, and if all ok then freeze it for use.

Parameters:
props - The properties
Returns:
The PMF to use

newPM

protected org.datanucleus.jdo.JDOPersistenceManager newPM(org.datanucleus.jdo.JDOPersistenceManagerFactory jdoPmf,
                                                          String userName,
                                                          String password)
Construct a JDOPersistenceManager. Override if you want to construct a subclass instead.

Overrides:
newPM in class org.datanucleus.jdo.JDOPersistenceManagerFactory


Copyright © 2011. All Rights Reserved.