|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter
public abstract class AbstractJpaVendorAdapter
Abstract JpaVendorAdapter
implementation that defines common properties,
to be translated into vendor-specific JPA properties by concrete subclasses.
Constructor Summary | |
---|---|
AbstractJpaVendorAdapter()
|
Method Summary | |
---|---|
protected Database |
getDatabase()
Return the target database to operate on. |
protected String |
getDatabasePlatform()
Return the name of the target database to operate on. |
Class<? extends EntityManagerFactory> |
getEntityManagerFactoryInterface()
Return the vendor-specific EntityManagerFactory interface that the EntityManagerFactory proxy is supposed to implement. |
Class<? extends EntityManager> |
getEntityManagerInterface()
Return the vendor-specific EntityManager interface that this provider's EntityManagers will implement. |
JpaDialect |
getJpaDialect()
Return the vendor-specific JpaDialect implementation for this provider, or null if there is none. |
Map<String,?> |
getJpaPropertyMap()
Return a Map of vendor-specific JPA properties, typically based on settings in this JpaVendorAdapter instance. |
String |
getPersistenceProviderRootPackage()
Return the name of the persistence provider's root package (e.g. |
protected boolean |
isGenerateDdl()
Return whether to generate DDL after the EntityManagerFactory has been initialized creating/updating all relevant tables. |
protected boolean |
isShowSql()
Return whether to show SQL in the log (or in the console). |
void |
postProcessEntityManagerFactory(EntityManagerFactory emf)
Post-process the EntityManagerFactory after it has been initialized. |
void |
setDatabase(Database database)
Specify the target database to operate on, as a value of the Database enum:
DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE |
void |
setDatabasePlatform(String databasePlatform)
Specify the name of the target database to operate on. |
void |
setGenerateDdl(boolean generateDdl)
Set whether to generate DDL after the EntityManagerFactory has been initialized, creating/updating all relevant tables. |
void |
setShowSql(boolean showSql)
Set whether to show SQL in the log (or in the console). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.orm.jpa.JpaVendorAdapter |
---|
getPersistenceProvider |
Constructor Detail |
---|
public AbstractJpaVendorAdapter()
Method Detail |
---|
public void setDatabase(Database database)
Database
enum:
DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE
protected Database getDatabase()
public void setDatabasePlatform(String databasePlatform)
protected String getDatabasePlatform()
public void setGenerateDdl(boolean generateDdl)
Note that the exact semantics of this flag depend on the underlying persistence provider. For any more advanced needs, specify the appropriate vendor-specific settings as "jpaProperties".
AbstractEntityManagerFactoryBean.setJpaProperties(java.util.Properties)
protected boolean isGenerateDdl()
public void setShowSql(boolean showSql)
For more specific logging configuration, specify the appropriate vendor-specific settings as "jpaProperties".
AbstractEntityManagerFactoryBean.setJpaProperties(java.util.Properties)
protected boolean isShowSql()
public String getPersistenceProviderRootPackage()
JpaVendorAdapter
getPersistenceProviderRootPackage
in interface JpaVendorAdapter
public Map<String,?> getJpaPropertyMap()
JpaVendorAdapter
Note that there might be further JPA properties defined on the EntityManagerFactory bean, which might potentially override individual JPA property values specified here.
getJpaPropertyMap
in interface JpaVendorAdapter
null
or an empty Map
if there are no such properties to exposePersistence.createEntityManagerFactory(String, java.util.Map)
,
PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)
public JpaDialect getJpaDialect()
JpaVendorAdapter
null
if there is none.
getJpaDialect
in interface JpaVendorAdapter
public Class<? extends EntityManagerFactory> getEntityManagerFactoryInterface()
JpaVendorAdapter
If the provider does not offer any EntityManagerFactory extensions,
the adapter should simply return the standard
EntityManagerFactory
class here.
getEntityManagerFactoryInterface
in interface JpaVendorAdapter
public Class<? extends EntityManager> getEntityManagerInterface()
JpaVendorAdapter
If the provider does not offer any EntityManager extensions,
the adapter should simply return the standard
EntityManager
class here.
getEntityManagerInterface
in interface JpaVendorAdapter
public void postProcessEntityManagerFactory(EntityManagerFactory emf)
postProcessEntityManagerFactory
in interface JpaVendorAdapter
emf
- the EntityManagerFactory to process
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |