public abstract class EntityManagerFactoryImpl extends Object
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
,
EntityManagerFactory
Modifier and Type | Field and Description |
---|---|
protected boolean |
isOpen |
protected Map |
properties |
protected ServerSession |
serverSession |
protected EntityManagerSetupImpl |
setupImpl |
Constructor and Description |
---|
EntityManagerFactoryImpl(EntityManagerSetupImpl setupImpl,
Map properties) |
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.
|
protected EntityManagerImpl |
createEntityManagerImpl(boolean extended) |
protected EntityManagerImpl |
createEntityManagerImpl(Map properties,
boolean extended) |
protected abstract EntityManagerImpl |
createEntityManagerImplInternal(Map properties,
boolean extended) |
protected void |
finalize() |
ServerSession |
getServerSession()
INTERNAL:
Returns the ServerSession that the Factory will be using and initializes it if it is not available.
|
boolean |
isOpen()
Indicates whether or not this factory is open.
|
protected void |
verifyOpen() |
protected ServerSession serverSession
protected EntityManagerSetupImpl setupImpl
protected boolean isOpen
protected Map properties
public EntityManagerFactoryImpl(ServerSession serverSession)
serverSession
- public EntityManagerFactoryImpl(EntityManagerSetupImpl setupImpl, Map properties)
protected abstract EntityManagerImpl createEntityManagerImplInternal(Map properties, boolean extended)
public ServerSession getServerSession()
public void close()
IllegalStateException
, except for isOpen
, which will return
false
.public boolean isOpen()
true
until a call
to close()
is made.protected EntityManagerImpl createEntityManagerImpl(boolean extended)
protected EntityManagerImpl createEntityManagerImpl(Map properties, boolean extended)
protected void verifyOpen()
Copyright © 2022. All rights reserved.