public class EntityManagerFactoryImpl extends EntityManagerFactoryImpl implements javax.persistence.EntityManagerFactory
Purpose: Provides the implementation for the EntityManager Factory.
Description: This class will store a reference to the active ServerSession. When a request is made for an EntityManager an new EntityManager is created with the ServerSession and returned. The primary consumer of these EntityManager is assumed to be either the Container. There is one EntityManagerFactory per deployment.
EntityManager
,
EntityManager
,
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactory
isOpen, properties, serverSession, setupImpl
Constructor and Description |
---|
EntityManagerFactoryImpl(EntityManagerSetupImpl setupImpl,
java.util.Map properties)
Will return an instance of the Factory.
|
EntityManagerFactoryImpl(ServerSession serverSession)
Will return an instance of the Factory.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this factory, releasing any resources that might be held by this factory.
|
javax.persistence.EntityManager |
createEntityManager()
PUBLIC:
Returns an EntityManager for this deployment
|
javax.persistence.EntityManager |
createEntityManager(java.util.Map properties)
PUBLIC:
Returns an EntityManager for this deployment
|
protected EntityManagerImpl |
createEntityManagerImplInternal(java.util.Map properties,
boolean extended) |
javax.persistence.Cache |
getCache() |
javax.persistence.criteria.CriteriaBuilder |
getCriteriaBuilder() |
javax.persistence.metamodel.Metamodel |
getMetamodel() |
javax.persistence.PersistenceUnitUtil |
getPersistenceUnitUtil() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
boolean |
isOpen()
Indicates whether or not this factory is open.
|
createEntityManagerImpl, createEntityManagerImpl, finalize, getServerSession, verifyOpen
public EntityManagerFactoryImpl(ServerSession serverSession)
serverSession
- public EntityManagerFactoryImpl(EntityManagerSetupImpl setupImpl, java.util.Map properties)
serverSession
- public void close()
EntityManagerFactoryImpl
IllegalStateException
, except for EntityManagerFactoryImpl.isOpen
, which will return
false
.close
in interface javax.persistence.EntityManagerFactory
close
in class EntityManagerFactoryImpl
public javax.persistence.Cache getCache()
getCache
in interface javax.persistence.EntityManagerFactory
public javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
getCriteriaBuilder
in interface javax.persistence.EntityManagerFactory
public javax.persistence.metamodel.Metamodel getMetamodel()
getMetamodel
in interface javax.persistence.EntityManagerFactory
public javax.persistence.PersistenceUnitUtil getPersistenceUnitUtil()
getPersistenceUnitUtil
in interface javax.persistence.EntityManagerFactory
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties
in interface javax.persistence.EntityManagerFactory
public boolean isOpen()
EntityManagerFactoryImpl
true
until a call
to EntityManagerFactoryImpl.close()
is made.isOpen
in interface javax.persistence.EntityManagerFactory
isOpen
in class EntityManagerFactoryImpl
public javax.persistence.EntityManager createEntityManager()
createEntityManager
in interface javax.persistence.EntityManagerFactory
public javax.persistence.EntityManager createEntityManager(java.util.Map properties)
createEntityManager
in interface javax.persistence.EntityManagerFactory
protected EntityManagerImpl createEntityManagerImplInternal(java.util.Map properties, boolean extended)
createEntityManagerImplInternal
in class EntityManagerFactoryImpl