public abstract class JPAInitializer extends Object
JavaSECMPInitializer| Modifier and Type | Field and Description |
|---|---|
protected Map<String,EntityManagerSetupImpl> |
initialEmSetupImpls |
protected ClassLoader |
initializationClassloader |
protected static Map<ClassLoader,JPAInitializer> |
initializers |
protected Map<String,SEPersistenceUnitInfo> |
initialPuInfos |
protected boolean |
shouldCreateInternalLoader |
| Constructor and Description |
|---|
JPAInitializer() |
| Modifier and Type | Method and Description |
|---|---|
EntityManagerSetupImpl |
callPredeploy(SEPersistenceUnitInfo persistenceUnitInfo,
Map m,
String persistenceUnitUniqueName,
String sessionName)
predeploy (with deploy) is one of the two steps required in deployment of entities
This method will prepare to call predeploy, call it and finally register the
transformer returned to be used for weaving.
|
abstract void |
checkWeaving(Map properties)
Check whether weaving is possible and update the properties and variable as appropriate
|
protected abstract ClassLoader |
createTempLoader(Collection col)
Create a temporary class loader that can be used to inspect classes and then
thrown away.
|
protected abstract ClassLoader |
createTempLoader(Collection col,
boolean shouldOverrideLoadClassForCollectionMembers) |
String |
createUniquePersistenceUnitName(jakarta.persistence.spi.PersistenceUnitInfo puInfo)
In case persistence unit is not uniquely defined by name
this method is called to generate a unique name.
|
EntityManagerSetupImpl |
extractInitialEmSetupImpl(String puName) |
SEPersistenceUnitInfo |
findPersistenceUnitInfo(String puName,
Map m)
Find PersistenceUnitInfo corresponding to the persistence unit name.
|
protected SEPersistenceUnitInfo |
findPersistenceUnitInfoInArchive(String puName,
Archive archive,
Map m)
Find PersistenceUnitInfo corresponding to the persistence unit name in the archive.
|
protected SEPersistenceUnitInfo |
findPersistenceUnitInfoInArchives(String puName,
Map m)
Find PersistenceUnitInfo corresponding to the persistence unit name.
|
ClassLoader |
getInitializationClassLoader() |
void |
initialize(Map m)
This method initializes the container.
|
static void |
initializeTopLinkLoggingFile()
Initialize the logging file if it is specified by the system property.
|
protected void |
initPersistenceUnits(Archive archive,
Map m)
Initialize all persistence units found on initializationClassLoader.
|
boolean |
isPersistenceProviderSupported(String providerClassName)
Returns whether the given persistence provider class is supported by this implementation
|
boolean |
isPersistenceUnitUniquelyDefinedByName()
Indicates whether puName uniquely defines the persistence unit.
|
protected boolean |
keepAllPredeployedPersistenceUnits()
Indicates whether initialPuInfos and initialEmSetupImpls are used.
|
protected Set |
loadEntityClasses(Collection entityNames,
ClassLoader classLoader)
Create a list of java.lang.Class that contains the classes of all the entities
that we will be deploying.
|
abstract void |
registerTransformer(jakarta.persistence.spi.ClassTransformer transformer,
jakarta.persistence.spi.PersistenceUnitInfo persistenceUnitInfo,
Map properties)
Register a transformer.
|
protected boolean shouldCreateInternalLoader
protected ClassLoader initializationClassloader
protected Map<String,SEPersistenceUnitInfo> initialPuInfos
protected Map<String,EntityManagerSetupImpl> initialEmSetupImpls
protected static Map<ClassLoader,JPAInitializer> initializers
public static void initializeTopLinkLoggingFile()
public EntityManagerSetupImpl callPredeploy(SEPersistenceUnitInfo persistenceUnitInfo, Map m, String persistenceUnitUniqueName, String sessionName)
public abstract void checkWeaving(Map properties)
properties - The list of properties to check for weaving and update if weaving is not neededprotected abstract ClassLoader createTempLoader(Collection col)
protected abstract ClassLoader createTempLoader(Collection col, boolean shouldOverrideLoadClassForCollectionMembers)
public SEPersistenceUnitInfo findPersistenceUnitInfo(String puName, Map m)
protected SEPersistenceUnitInfo findPersistenceUnitInfoInArchives(String puName, Map m)
protected SEPersistenceUnitInfo findPersistenceUnitInfoInArchive(String puName, Archive archive, Map m)
public boolean isPersistenceProviderSupported(String providerClassName)
providerClassName - protected Set loadEntityClasses(Collection entityNames, ClassLoader classLoader)
public abstract void registerTransformer(jakarta.persistence.spi.ClassTransformer transformer,
jakarta.persistence.spi.PersistenceUnitInfo persistenceUnitInfo,
Map properties)
transformer - persistenceUnitInfo - public boolean isPersistenceUnitUniquelyDefinedByName()
public String createUniquePersistenceUnitName(jakarta.persistence.spi.PersistenceUnitInfo puInfo)
public EntityManagerSetupImpl extractInitialEmSetupImpl(String puName)
public void initialize(Map m)
protected void initPersistenceUnits(Archive archive, Map m)
protected boolean keepAllPredeployedPersistenceUnits()
public ClassLoader getInitializationClassLoader()
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.