public class PersistenceProviderImpl extends Object implements javax.persistence.spi.PersistenceProvider, javax.persistence.spi.ProviderUtil
Constructor and Description |
---|
PersistenceProviderImpl()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.persistence.EntityManagerFactory |
createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo unitInfo,
Map properties)
Method to create an EntityManagerFactory when running in JavaEE.
|
javax.persistence.EntityManagerFactory |
createEntityManagerFactory(String unitName,
Map properties)
Method to create an EntityManagerFactory when running in JavaSE.
|
void |
generateSchema(javax.persistence.spi.PersistenceUnitInfo unitInfo,
Map overridingProps)
Create database schemas and/or tables and/or create DDL scripts as determined by the supplied properties.
|
boolean |
generateSchema(String unitName,
Map overridingProps)
Create database schemas and/or tables and/or create DDL scripts as determined by the supplied properties.
|
protected void |
generateSchemaForPersistentUnit(org.datanucleus.metadata.PersistenceUnitMetaData pumd,
Map overridingProps) |
javax.persistence.spi.ProviderUtil |
getProviderUtil() |
javax.persistence.spi.LoadState |
isLoaded(Object entity)
If the provider determines that the entity has been provided
by itself and that the state of all attributes for which
FetchType EAGER has been specified have been loaded, this
method returns LoadState.LOADED.
|
javax.persistence.spi.LoadState |
isLoadedWithoutReference(Object entity,
String memberName)
If the provider determines that the entity has been provided
by itself and that the state of the specified attribute has
been loaded, this method returns LoadState.LOADED.
|
javax.persistence.spi.LoadState |
isLoadedWithReference(Object entity,
String memberName)
If the provider determines that the entity has been provided
by itself and that the state of the specified attribute has
been loaded, this method returns LoadState.LOADED.
|
public javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo unitInfo, Map properties)
createContainerEntityManagerFactory
in interface javax.persistence.spi.PersistenceProvider
unitInfo
- The "persistence-unit"properties
- EntityManagerFactory properties to override those in the persistence unitpublic javax.persistence.EntityManagerFactory createEntityManagerFactory(String unitName, Map properties)
createEntityManagerFactory
in interface javax.persistence.spi.PersistenceProvider
unitName
- Name of the "persistence-unit"properties
- EntityManagerFactory properties to override those in the persistence unitpublic javax.persistence.spi.LoadState isLoadedWithoutReference(Object entity, String memberName)
isLoadedWithoutReference
in interface javax.persistence.spi.ProviderUtil
entity
- The entitymemberName
- Name of member whose load status is to be determinedpublic javax.persistence.spi.LoadState isLoadedWithReference(Object entity, String memberName)
isLoadedWithReference
in interface javax.persistence.spi.ProviderUtil
entity
- The entitymemberName
- name of member whose load status is to be determinedpublic javax.persistence.spi.LoadState isLoaded(Object entity)
isLoaded
in interface javax.persistence.spi.ProviderUtil
entity
- whose loaded status is to be determinedpublic javax.persistence.spi.ProviderUtil getProviderUtil()
getProviderUtil
in interface javax.persistence.spi.PersistenceProvider
public void generateSchema(javax.persistence.spi.PersistenceUnitInfo unitInfo, Map overridingProps)
generateSchema
in interface javax.persistence.spi.PersistenceProvider
unitInfo
- metadata for use by the persistence provideroverridingProps
- properties for schema generation; these may also include provider-specific propertiesjavax.persistence.PersistenceException
- if insufficient or inconsistent configuration information is provided
or if schema generation otherwise fails.public boolean generateSchema(String unitName, Map overridingProps)
generateSchema
in interface javax.persistence.spi.PersistenceProvider
unitName
- Name of the persistence unitoverridingProps
- properties for schema generation; these may also include provider-specific propertiesjavax.persistence.PersistenceException
- if insufficient or inconsistent configuration information is provided
or if schema generation otherwise fails.protected void generateSchemaForPersistentUnit(org.datanucleus.metadata.PersistenceUnitMetaData pumd, Map overridingProps)
Copyright © 2015. All rights reserved.