@Extension public class PersistenceService extends Object
EntityManagerFactory.| Constructor and Description |
|---|
PersistenceService() |
| Modifier and Type | Method and Description |
|---|---|
javax.persistence.EntityManagerFactory |
createEntityManagerFactory(DataSource dataSource,
List<Class> classes) |
javax.persistence.EntityManagerFactory |
getGlobalEntityManagerFactory()
Obtains a fully configured
EntityManagerFactory for connecting
to global database. |
javax.persistence.EntityManagerFactory |
getPerItemEntityManagerFactory(TopLevelItem item)
Obtains a fully configured
EntityManagerFactory for connecting
to per-item database of the specific item. |
public javax.persistence.EntityManagerFactory createEntityManagerFactory(DataSource dataSource, List<Class> classes)
@CheckForNull public javax.persistence.EntityManagerFactory getGlobalEntityManagerFactory() throws SQLException, IOException
EntityManagerFactory for connecting
to global database.SQLExceptionIOException@CheckForNull public javax.persistence.EntityManagerFactory getPerItemEntityManagerFactory(TopLevelItem item) throws SQLException, IOException
EntityManagerFactory for connecting
to per-item database of the specific item.SQLExceptionIOExceptionCopyright © 2016–2020. All rights reserved.