|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JpaService
Provides management functionality for JPA entity manager
| Method Summary | |
|---|---|
void |
addEntityManagerFactoryListener(EntityManagerFactoryListener listener)
Add a listener for receiving entity manager factory event |
javax.persistence.EntityManager |
createEntityManager(java.lang.String factoryName)
Create a new entity manager using registered entity manager factory |
javax.persistence.EntityManager |
createEntityManager(java.lang.String factoryName,
java.util.Map map)
Create a new entity manager with the specified Map of properties using registered entity manager factory |
javax.persistence.EntityManagerFactory |
createEntityManagerFactory(java.util.Properties props,
java.util.List<java.lang.Class> entityClasses)
Create new entity manager factory with specified configurations. |
javax.persistence.EntityManagerFactory |
getEntityManagerFactory(java.lang.String factoryName)
Get an entity manager factory from JPA service |
EntityManagerFactoryConfig |
getEntityManagerFactoryConfig(java.lang.String factoryName)
Returns JPA configurations for specified entity manager factory |
java.util.Set<java.lang.String> |
getEntityManagerFactoryNames()
Returns names of current registered JPA entity manager factories |
void |
registerEntityManagerFactory(java.lang.String factoryName,
java.util.Properties props,
long bundleId)
Create and register new entity manager factory |
void |
removeEntityManagerFactoryListener(EntityManagerFactoryListener listener)
Remove the listener for receiving entity manager factory event |
void |
unregisterEntityManagerFactory(java.lang.String factoryName)
Close and unregister the entity manager factory |
| Method Detail |
|---|
javax.persistence.EntityManagerFactory createEntityManagerFactory(java.util.Properties props,
java.util.List<java.lang.Class> entityClasses)
props - the jpa configurationsentityClasses - the related JPA entity class names
java.util.Set<java.lang.String> getEntityManagerFactoryNames()
EntityManagerFactoryConfig getEntityManagerFactoryConfig(java.lang.String factoryName)
factoryName - the alias for entity manager factory
void registerEntityManagerFactory(java.lang.String factoryName,
java.util.Properties props,
long bundleId)
throws org.osgi.framework.BundleException
factoryName - the alias for new entity manager factoryprops - the JPA configurationsbundleId - the id of bundle that contains kraken-jpa configurations and
entity classes
org.osgi.framework.BundleException - if bundle not foundvoid unregisterEntityManagerFactory(java.lang.String factoryName)
factoryName - the alias for new entity manager factoryjavax.persistence.EntityManagerFactory getEntityManagerFactory(java.lang.String factoryName)
factoryName - the alias for the entity manager factory
javax.persistence.EntityManager createEntityManager(java.lang.String factoryName)
factoryName - the name of registered entity manager factory
javax.persistence.EntityManager createEntityManager(java.lang.String factoryName,
java.util.Map map)
factoryName - the alias for the entity manager factorymap - the properties
void addEntityManagerFactoryListener(EntityManagerFactoryListener listener)
listener - the listener instancevoid removeEntityManagerFactoryListener(EntityManagerFactoryListener listener)
listener - the listener instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||