|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceUnitManager
Interface that defines an abstraction for finding and managing
JPA PersistenceUnitInfos. Used by
LocalContainerEntityManagerFactoryBean
in order to obtain a PersistenceUnitInfo
for building a concrete EntityManagerFactory
.
Obtaining a PersistenceUnitInfo instance is an exclusive process. A PersistenceUnitInfo instance is not available for further calls anymore once it has been obtained.
DefaultPersistenceUnitManager
,
LocalContainerEntityManagerFactoryBean.setPersistenceUnitManager(org.springframework.orm.jpa.persistenceunit.PersistenceUnitManager)
Method Summary | |
---|---|
javax.persistence.spi.PersistenceUnitInfo |
obtainDefaultPersistenceUnitInfo()
Obtain the default PersistenceUnitInfo from this manager. |
javax.persistence.spi.PersistenceUnitInfo |
obtainPersistenceUnitInfo(String persistenceUnitName)
Obtain the specified PersistenceUnitInfo from this manager. |
Method Detail |
---|
javax.persistence.spi.PersistenceUnitInfo obtainDefaultPersistenceUnitInfo() throws IllegalStateException
null
)
IllegalStateException
- if there is no default PersistenceUnitInfo defined
or it has already been obtainedjavax.persistence.spi.PersistenceUnitInfo obtainPersistenceUnitInfo(String persistenceUnitName) throws IllegalArgumentException, IllegalStateException
persistenceUnitName
- the name of the desired persistence unit
null
)
IllegalArgumentException
- if no PersistenceUnitInfo with the given
name is defined
IllegalStateException
- if the PersistenceUnitInfo with the given
name has already been obtained
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |