Package org.apache.openjpa.persistence
Class PersistenceProviderImpl
- java.lang.Object
- 
- org.apache.openjpa.persistence.PersistenceProviderImpl
 
- 
- All Implemented Interfaces:
- jakarta.persistence.spi.PersistenceProvider,- jakarta.persistence.spi.ProviderUtil
 
 public class PersistenceProviderImpl extends java.lang.Object implements jakarta.persistence.spi.PersistenceProvider, jakarta.persistence.spi.ProviderUtilBootstrapping class that allows the creation of a stand-aloneEntityManager.- See Also:
- Persistence.createEntityManagerFactory(String,Map)
 
- 
- 
Constructor SummaryConstructors Constructor Description PersistenceProviderImpl()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptProvider(java.util.Map properties)OpenJPAEntityManagerFactorycreateContainerEntityManagerFactory(jakarta.persistence.spi.PersistenceUnitInfo pui, java.util.Map m)OpenJPAEntityManagerFactorycreateEntityManagerFactory(java.lang.String name, java.lang.String resource, java.util.Map m)Loads the entity manager specified byname, applying the properties inmas overrides to the properties defined in the XML configuration file forname.OpenJPAEntityManagerFactorycreateEntityManagerFactory(java.lang.String name, java.util.Map m)voidgenerateSchema(jakarta.persistence.spi.PersistenceUnitInfo info, java.util.Map map)booleangenerateSchema(java.lang.String persistenceUnitName, java.util.Map map)protected java.lang.StringgetDefaultBrokerAlias()jakarta.persistence.spi.ProviderUtilgetProviderUtil()jakarta.persistence.spi.LoadStateisLoaded(java.lang.Object obj)Determines whether the specified object is loaded.jakarta.persistence.spi.LoadStateisLoadedWithoutReference(java.lang.Object obj, java.lang.String attr)Determines whether the attribute on the specified object is loaded.jakarta.persistence.spi.LoadStateisLoadedWithReference(java.lang.Object obj, java.lang.String attr)Determines whether the attribute on the specified object is loaded.protected OpenJPAConfigurationnewConfigurationImpl()voidsetPersistenceEnvironmentInfo(OpenJPAConfiguration conf, jakarta.persistence.spi.PersistenceUnitInfo pui)
 
- 
- 
- 
Method Detail- 
createEntityManagerFactorypublic OpenJPAEntityManagerFactory createEntityManagerFactory(java.lang.String name, java.lang.String resource, java.util.Map m) Loads the entity manager specified byname, applying the properties inmas overrides to the properties defined in the XML configuration file forname. Ifnameisnull, this method loads the XML in the resource identified byresource, and uses the first resource found when doing this lookup, regardless of the name specified in the XML resource or the name of the jar that the resource is contained in. This does no pooling of EntityManagersFactories.- Returns:
- EntityManagerFactory or null
 
 - 
createEntityManagerFactorypublic OpenJPAEntityManagerFactory createEntityManagerFactory(java.lang.String name, java.util.Map m) - Specified by:
- createEntityManagerFactoryin interface- jakarta.persistence.spi.PersistenceProvider
 
 - 
createContainerEntityManagerFactorypublic OpenJPAEntityManagerFactory createContainerEntityManagerFactory(jakarta.persistence.spi.PersistenceUnitInfo pui, java.util.Map m) - Specified by:
- createContainerEntityManagerFactoryin interface- jakarta.persistence.spi.PersistenceProvider
 
 - 
generateSchemapublic void generateSchema(jakarta.persistence.spi.PersistenceUnitInfo info, java.util.Map map)- Specified by:
- generateSchemain interface- jakarta.persistence.spi.PersistenceProvider
 
 - 
generateSchemapublic boolean generateSchema(java.lang.String persistenceUnitName, java.util.Map map)- Specified by:
- generateSchemain interface- jakarta.persistence.spi.PersistenceProvider
 
 - 
acceptProviderpublic boolean acceptProvider(java.util.Map properties) 
 - 
setPersistenceEnvironmentInfopublic void setPersistenceEnvironmentInfo(OpenJPAConfiguration conf, jakarta.persistence.spi.PersistenceUnitInfo pui) 
 - 
getProviderUtilpublic jakarta.persistence.spi.ProviderUtil getProviderUtil() - Specified by:
- getProviderUtilin interface- jakarta.persistence.spi.PersistenceProvider
 
 - 
getDefaultBrokerAliasprotected java.lang.String getDefaultBrokerAlias() 
 - 
newConfigurationImplprotected OpenJPAConfiguration newConfigurationImpl() 
 - 
isLoadedpublic jakarta.persistence.spi.LoadState isLoaded(java.lang.Object obj) Determines whether the specified object is loaded.- Specified by:
- isLoadedin interface- jakarta.persistence.spi.ProviderUtil
- Returns:
- LoadState.LOADED - if all implicit or explicit EAGER fetch attributes are loaded LoadState.NOT_LOADED - if any implicit or explicit EAGER fetch attribute is not loaded LoadState.UNKNOWN - if the entity is not managed by this provider.
 
 - 
isLoadedWithReferencepublic jakarta.persistence.spi.LoadState isLoadedWithReference(java.lang.Object obj, java.lang.String attr)Determines whether the attribute on the specified object is loaded. This method may access the value of the attribute to determine load state (but currently does not).- Specified by:
- isLoadedWithReferencein interface- jakarta.persistence.spi.ProviderUtil
- Returns:
- LoadState.LOADED - if the attribute is loaded. LoadState.NOT_LOADED - if the attribute is not loaded or any EAGER fetch attributes of the entity are not loaded. LoadState.UNKNOWN - if the entity is not managed by this provider or if it does not contain the persistent attribute.
 
 - 
isLoadedWithoutReferencepublic jakarta.persistence.spi.LoadState isLoadedWithoutReference(java.lang.Object obj, java.lang.String attr)Determines whether the attribute on the specified object is loaded. This method does not access the value of the attribute to determine load state.- Specified by:
- isLoadedWithoutReferencein interface- jakarta.persistence.spi.ProviderUtil
- Returns:
- LoadState.LOADED - if the attribute is loaded. LoadState.NOT_LOADED - if the attribute is not loaded or any EAGER fetch attributes of the entity are not loaded. LoadState.UNKNOWN - if the entity is not managed by this provider or if it does not contain the persistent attribute.
 
 
- 
 
-