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 Object implements jakarta.persistence.spi.PersistenceProvider, jakarta.persistence.spi.ProviderUtil
Bootstrapping class that allows the creation of a stand-aloneEntityManager.- See Also:
 Persistence.createEntityManagerFactory(String,Map)
 
- 
- 
Constructor Summary
Constructors Constructor Description PersistenceProviderImpl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptProvider(Map properties)OpenJPAEntityManagerFactorycreateContainerEntityManagerFactory(jakarta.persistence.spi.PersistenceUnitInfo pui, Map m)OpenJPAEntityManagerFactorycreateEntityManagerFactory(String name, String resource, Map m)Loads the entity manager specified byname, applying the properties inmas overrides to the properties defined in the XML configuration file forname.OpenJPAEntityManagerFactorycreateEntityManagerFactory(String name, Map m)voidgenerateSchema(jakarta.persistence.spi.PersistenceUnitInfo info, Map map)booleangenerateSchema(String persistenceUnitName, Map map)protected StringgetDefaultBrokerAlias()jakarta.persistence.spi.ProviderUtilgetProviderUtil()jakarta.persistence.spi.LoadStateisLoaded(Object obj)Determines whether the specified object is loaded.jakarta.persistence.spi.LoadStateisLoadedWithoutReference(Object obj, String attr)Determines whether the attribute on the specified object is loaded.jakarta.persistence.spi.LoadStateisLoadedWithReference(Object obj, String attr)Determines whether the attribute on the specified object is loaded.protected OpenJPAConfigurationnewConfigurationImpl()voidsetPersistenceEnvironmentInfo(OpenJPAConfiguration conf, jakarta.persistence.spi.PersistenceUnitInfo pui) 
 - 
 
- 
- 
Method Detail
- 
createEntityManagerFactory
public OpenJPAEntityManagerFactory createEntityManagerFactory(String name, String resource, 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
 
 
- 
createEntityManagerFactory
public OpenJPAEntityManagerFactory createEntityManagerFactory(String name, Map m)
- Specified by:
 createEntityManagerFactoryin interfacejakarta.persistence.spi.PersistenceProvider
 
- 
createContainerEntityManagerFactory
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(jakarta.persistence.spi.PersistenceUnitInfo pui, Map m)
- Specified by:
 createContainerEntityManagerFactoryin interfacejakarta.persistence.spi.PersistenceProvider
 
- 
generateSchema
public void generateSchema(jakarta.persistence.spi.PersistenceUnitInfo info, Map map)- Specified by:
 generateSchemain interfacejakarta.persistence.spi.PersistenceProvider
 
- 
generateSchema
public boolean generateSchema(String persistenceUnitName, Map map)
- Specified by:
 generateSchemain interfacejakarta.persistence.spi.PersistenceProvider
 
- 
acceptProvider
public boolean acceptProvider(Map properties)
 
- 
setPersistenceEnvironmentInfo
public void setPersistenceEnvironmentInfo(OpenJPAConfiguration conf, jakarta.persistence.spi.PersistenceUnitInfo pui)
 
- 
getProviderUtil
public jakarta.persistence.spi.ProviderUtil getProviderUtil()
- Specified by:
 getProviderUtilin interfacejakarta.persistence.spi.PersistenceProvider
 
- 
getDefaultBrokerAlias
protected String getDefaultBrokerAlias()
 
- 
newConfigurationImpl
protected OpenJPAConfiguration newConfigurationImpl()
 
- 
isLoaded
public jakarta.persistence.spi.LoadState isLoaded(Object obj)
Determines whether the specified object is loaded.- Specified by:
 isLoadedin interfacejakarta.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.
 
 
- 
isLoadedWithReference
public jakarta.persistence.spi.LoadState isLoadedWithReference(Object obj, 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 interfacejakarta.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.
 
 
- 
isLoadedWithoutReference
public jakarta.persistence.spi.LoadState isLoadedWithoutReference(Object obj, 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 interfacejakarta.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.
 
 
 - 
 
 -