站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

EntityManagerFactoryInfo (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.orm.jpa
Interface EntityManagerFactoryInfo

All Known Implementing Classes:
AbstractEntityManagerFactoryBean, LocalContainerEntityManagerFactoryBean, LocalEntityManagerFactoryBean

public interface EntityManagerFactoryInfo

Metadata interface for a Spring-managed EntityManagerFactory.

This facility can be obtained from Spring-managed EntityManagerFactory proxies through casting the EntityManagerFactory to this interface.

Since:
2.0
Author:
Rod Johnson, Juergen Hoeller

Method Summary
 DataSource getDataSource()
          Return the JDBC DataSource that this EntityManagerFactory obtains its JDBC Connections from.
 Class<? extends javax.persistence.EntityManager> getEntityManagerInterface()
          Return the (potentially vendor-specific) EntityManager interface that this factory's EntityManagers will implement.
 JpaDialect getJpaDialect()
          Return the vendor-specific JpaDialect implementation for this EntityManagerFactory, or null if not known.
 javax.persistence.EntityManagerFactory getNativeEntityManagerFactory()
          Return the raw underlying EntityManagerFactory.
 javax.persistence.spi.PersistenceProvider getPersistenceProvider()
          Return the underlying PersistenceProvider that the underlying EntityManagerFactory was created with.
 javax.persistence.spi.PersistenceUnitInfo getPersistenceUnitInfo()
          Return the PersistenceUnitInfo used to create this EntityManagerFactory, if the in-container API was used.
 String getPersistenceUnitName()
          Return the name of the persistence unit used to create this EntityManagerFactory, or null if it is an unnamed default.
 

Method Detail

getNativeEntityManagerFactory

javax.persistence.EntityManagerFactory getNativeEntityManagerFactory()
Return the raw underlying EntityManagerFactory.

Returns:
the unadorned EntityManagerFactory (never null)

getPersistenceProvider

javax.persistence.spi.PersistenceProvider getPersistenceProvider()
Return the underlying PersistenceProvider that the underlying EntityManagerFactory was created with.

Returns:
the PersistenceProvider used to create this EntityManagerFactory, or null if the standard JPA provider autodetection process was used to configure the EntityManagerFactory

getPersistenceUnitInfo

javax.persistence.spi.PersistenceUnitInfo getPersistenceUnitInfo()
Return the PersistenceUnitInfo used to create this EntityManagerFactory, if the in-container API was used.

Returns:
the PersistenceUnitInfo used to create this EntityManagerFactory, or null if the in-container contract was not used to configure the EntityManagerFactory

getPersistenceUnitName

String getPersistenceUnitName()
Return the name of the persistence unit used to create this EntityManagerFactory, or null if it is an unnamed default. If getPersistenceUnitInfo() returns non-null, the return type of getPersistenceUnitName() must be equal to the value returned by PersistenceUnitInfo.getPersistenceUnitName().

See Also:
getPersistenceUnitInfo(), PersistenceUnitInfo.getPersistenceUnitName()

getDataSource

DataSource getDataSource()
Return the JDBC DataSource that this EntityManagerFactory obtains its JDBC Connections from.

Returns:
the JDBC DataSource, or null if not known

getEntityManagerInterface

Class<? extends javax.persistence.EntityManager> getEntityManagerInterface()
Return the (potentially vendor-specific) EntityManager interface that this factory's EntityManagers will implement.


getJpaDialect

JpaDialect getJpaDialect()
Return the vendor-specific JpaDialect implementation for this EntityManagerFactory, or null if not known.


The Spring Framework

Copyright © 2002-2007 The Spring Framework.