Class OpenJpaVendorAdapter
- java.lang.Object
-
- org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter
-
- org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter
-
- All Implemented Interfaces:
JpaVendorAdapter
public class OpenJpaVendorAdapter extends AbstractJpaVendorAdapter
JpaVendorAdapter
implementation for Apache OpenJPA. Developed and tested against OpenJPA 3.0. Exposes OpenJPA's persistence provider and EntityManager extension interface, and adaptsAbstractJpaVendorAdapter
's common configuration settings. No support for the detection of annotated packages (throughSmartPersistenceUnitInfo.getManagedPackages()
) since OpenJPA doesn't use package-level metadata.- Since:
- 2.0
- Author:
- Juergen Hoeller, Costin Leau
- See Also:
OpenJpaDialect
,PersistenceProviderImpl
,OpenJPAEntityManager
-
-
Constructor Summary
Constructors Constructor Description OpenJpaVendorAdapter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String
determineDatabaseDictionary(Database database)
Determine the OpenJPA database dictionary name for the given database.Class<? extends javax.persistence.EntityManagerFactory>
getEntityManagerFactoryInterface()
Class<? extends javax.persistence.EntityManager>
getEntityManagerInterface()
OpenJpaDialect
getJpaDialect()
Map<String,Object>
getJpaPropertyMap()
javax.persistence.spi.PersistenceProvider
getPersistenceProvider()
String
getPersistenceProviderRootPackage()
-
Methods inherited from class org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter
getDatabase, getDatabasePlatform, getJpaPropertyMap, isGenerateDdl, isShowSql, postProcessEntityManager, postProcessEntityManagerFactory, setDatabase, setDatabasePlatform, setGenerateDdl, setShowSql
-
-
-
-
Method Detail
-
getPersistenceProvider
public javax.persistence.spi.PersistenceProvider getPersistenceProvider()
-
getPersistenceProviderRootPackage
public String getPersistenceProviderRootPackage()
- Specified by:
getPersistenceProviderRootPackage
in interfaceJpaVendorAdapter
- Overrides:
getPersistenceProviderRootPackage
in classAbstractJpaVendorAdapter
-
getJpaPropertyMap
public Map<String,Object> getJpaPropertyMap()
- Specified by:
getJpaPropertyMap
in interfaceJpaVendorAdapter
- Overrides:
getJpaPropertyMap
in classAbstractJpaVendorAdapter
-
determineDatabaseDictionary
protected static String determineDatabaseDictionary(Database database)
Determine the OpenJPA database dictionary name for the given database.- Parameters:
database
- the specified database- Returns:
- the OpenJPA database dictionary name, or
null
if none found
-
getJpaDialect
public OpenJpaDialect getJpaDialect()
- Specified by:
getJpaDialect
in interfaceJpaVendorAdapter
- Overrides:
getJpaDialect
in classAbstractJpaVendorAdapter
-
getEntityManagerFactoryInterface
public Class<? extends javax.persistence.EntityManagerFactory> getEntityManagerFactoryInterface()
- Specified by:
getEntityManagerFactoryInterface
in interfaceJpaVendorAdapter
- Overrides:
getEntityManagerFactoryInterface
in classAbstractJpaVendorAdapter
-
getEntityManagerInterface
public Class<? extends javax.persistence.EntityManager> getEntityManagerInterface()
- Specified by:
getEntityManagerInterface
in interfaceJpaVendorAdapter
- Overrides:
getEntityManagerInterface
in classAbstractJpaVendorAdapter
-
-