Class PersistenceProviderImpl
java.lang.Object
org.apache.openjpa.persistence.PersistenceProviderImpl
- All Implemented Interfaces:
PersistenceProvider, ProviderUtil
Bootstrapping class that allows the creation of a stand-alone
EntityManager.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptProvider(Map properties) 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.createEntityManagerFactory(String name, Map m) voidgenerateSchema(PersistenceUnitInfo info, Map map) booleangenerateSchema(String persistenceUnitName, Map map) protected StringDetermines whether the specified object is loaded.isLoadedWithoutReference(Object obj, String attr) Determines whether the attribute on the specified object is loaded.isLoadedWithReference(Object obj, String attr) Determines whether the attribute on the specified object is loaded.protected OpenJPAConfigurationvoid
-
Constructor Details
-
PersistenceProviderImpl
public PersistenceProviderImpl()
-
-
Method Details
-
createEntityManagerFactory
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
- Specified by:
createEntityManagerFactoryin interfacePersistenceProvider
-
createEntityManagerFactory
- Specified by:
createEntityManagerFactoryin interfacePersistenceProvider- Since:
- 4.2.0
-
createContainerEntityManagerFactory
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) - Specified by:
createContainerEntityManagerFactoryin interfacePersistenceProvider
-
generateSchema
- Specified by:
generateSchemain interfacePersistenceProvider
-
generateSchema
- Specified by:
generateSchemain interfacePersistenceProvider
-
acceptProvider
-
setPersistenceEnvironmentInfo
-
getProviderUtil
- Specified by:
getProviderUtilin interfacePersistenceProvider
-
getDefaultBrokerAlias
-
newConfigurationImpl
-
isLoaded
Determines whether the specified object is loaded.- Specified by:
isLoadedin interfaceProviderUtil- 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
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 interfaceProviderUtil- 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
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 interfaceProviderUtil- 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.
-