Interface JDOEntityManagerFactory
-
- All Superinterfaces:
javax.persistence.EntityManagerFactory
,PersistenceManagerFactory
,java.io.Serializable
public interface JDOEntityManagerFactory extends javax.persistence.EntityManagerFactory, PersistenceManagerFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JDOEntityManager
getPersistenceManager()
Get an instance ofJDOEntityManager
from this factory.JDOEntityManager
getPersistenceManager(java.lang.String userid, java.lang.String password)
Get an instance ofJDOEntityManager
from this factory.JDOEntityManager
getPersistenceManagerProxy()
Get a thread-safe instance of a proxy that dynamically binds on each method call to an instance ofJDOEntityManager
.-
Methods inherited from interface javax.persistence.EntityManagerFactory
close, createEntityManager, createEntityManager, isOpen
-
Methods inherited from interface javax.jdo.PersistenceManagerFactory
addFetchGroups, addInstanceLifecycleListener, close, getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionURL, getConnectionUserName, getCopyOnAttach, getDataStoreCache, getDetachAllOnCommit, getFetchGroup, getFetchGroups, getIgnoreCache, getMapping, getMultithreaded, getName, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getPersistenceUnitName, getProperties, getReadOnly, getRestoreValues, getRetainValues, getServerTimeZoneID, getTransactionIsolationLevel, getTransactionType, isClosed, removeAllFetchGroups, removeFetchGroups, removeInstanceLifecycleListener, setConnectionDriverName, setConnectionFactory, setConnectionFactory2, setConnectionFactory2Name, setConnectionFactoryName, setConnectionPassword, setConnectionURL, setConnectionUserName, setCopyOnAttach, setDetachAllOnCommit, setIgnoreCache, setMapping, setMultithreaded, setName, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setPersistenceUnitName, setReadOnly, setRestoreValues, setRetainValues, setServerTimeZoneID, setTransactionIsolationLevel, setTransactionType, supportedOptions
-
-
-
-
Method Detail
-
getPersistenceManager
JDOEntityManager getPersistenceManager()
Get an instance ofJDOEntityManager
from this factory. The instance has default values for options. This method overrides the getPersistenceManager method from PersistenceManagerFactory.After the first use of
getPersistenceManager
, no "set" methods will succeed.- Specified by:
getPersistenceManager
in interfacePersistenceManagerFactory
- Returns:
- a
JDOEntityManager
instance with default options.
-
getPersistenceManagerProxy
JDOEntityManager getPersistenceManagerProxy()
Get a thread-safe instance of a proxy that dynamically binds on each method call to an instance ofJDOEntityManager
.When used with a
JDOEntityManagerFactory
that uses TransactionType JTA, the proxy can be used in a server to dynamically bind to an instance from this factory associated with the thread's current transaction. In this case, the close method is ignored, as thePersistenceManager
is automatically closed when the transaction completes.When used with a
JDOEntityManagerFactory
that uses TransactionType RESOURCE_LOCAL, the proxy uses an inheritable ThreadLocal to bind to an instance ofJDOEntityManager
associated with the thread. In this case, the close method executed on the proxy closes theJDOEntityManager
and then clears the ThreadLocal. Use of this method does not affect the configurability of theJDOEntityManagerFactory
.- Specified by:
getPersistenceManagerProxy
in interfacePersistenceManagerFactory
- Returns:
- a
PersistenceManager
proxy. - Since:
- 2.1
-
getPersistenceManager
JDOEntityManager getPersistenceManager(java.lang.String userid, java.lang.String password)
Get an instance ofJDOEntityManager
from this factory. The instance has default values for options. The parametersuserid
andpassword
are used when obtaining datastore connections from the connection pool.After the first use of
getPersistenceManager
, no "set" methods will succeed.- Specified by:
getPersistenceManager
in interfacePersistenceManagerFactory
- Parameters:
userid
- the userid for the connectionpassword
- the password for the connection- Returns:
- a
JDOEntityManager
instance with default options.
-
-