Package de.xima.fc.jpa.manager
Class EMProvider
- java.lang.Object
-
- de.xima.fc.jpa.manager.EMProvider
-
public class EMProvider extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DB_HEALTHCECK_NAME
static com.codahale.metrics.health.HealthCheckRegistry
DB_HEALTHCHECK_REGISTRY
-
Constructor Summary
Constructors Constructor Description EMProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Boolean
closeEMF()
static Boolean
closeEMF(boolean supressListener)
static void
closeEntityManager(javax.persistence.EntityManager em)
static javax.persistence.EntityManager
createNewEntityManager()
static void
fireCloseListener()
static void
fireInitListener()
static void
fireOpenListener()
static Set<IBaseNotificationListener>
getCloseListeners()
static Connection
getConnection()
static EDatenbankTyp
getCurrentDBTyp()
static DataSource
getDatasource()
static IEMFactory
getEMFactory()
static Set<IBaseNotificationListener>
getInitListeners()
static Set<IBaseNotificationListener>
getOpenListeners()
static void
initialize()
static void
openEMF()
static void
openEMF(boolean supressListener)
static void
registerCloseListener(IBaseNotificationListener listener)
static void
registerInitListener(IBaseNotificationListener listener)
static void
registerOpenListener(IBaseNotificationListener listener)
static void
reloadFactory()
static void
reloadFactory(boolean supressAllListener)
static void
reloadFactory(boolean supressOpenListener, boolean supressCloseListener)
static void
setEMFactory(IEMFactory emFactory)
static void
shutdown()
static boolean
testConnection()
-
-
-
Field Detail
-
DB_HEALTHCECK_NAME
public static String DB_HEALTHCECK_NAME
-
DB_HEALTHCHECK_REGISTRY
public static com.codahale.metrics.health.HealthCheckRegistry DB_HEALTHCHECK_REGISTRY
-
-
Method Detail
-
createNewEntityManager
public static javax.persistence.EntityManager createNewEntityManager()
-
closeEMF
public static Boolean closeEMF()
-
closeEMF
public static Boolean closeEMF(boolean supressListener)
-
openEMF
public static void openEMF()
-
openEMF
public static void openEMF(boolean supressListener)
-
closeEntityManager
public static void closeEntityManager(javax.persistence.EntityManager em)
-
initialize
public static void initialize()
-
shutdown
public static void shutdown()
-
reloadFactory
public static void reloadFactory(boolean supressOpenListener, boolean supressCloseListener)
-
reloadFactory
public static void reloadFactory(boolean supressAllListener)
-
reloadFactory
public static void reloadFactory()
-
getCurrentDBTyp
public static EDatenbankTyp getCurrentDBTyp()
-
getEMFactory
public static IEMFactory getEMFactory()
-
setEMFactory
public static void setEMFactory(IEMFactory emFactory)
-
getOpenListeners
public static Set<IBaseNotificationListener> getOpenListeners()
-
registerOpenListener
public static void registerOpenListener(IBaseNotificationListener listener)
-
getCloseListeners
public static Set<IBaseNotificationListener> getCloseListeners()
-
registerCloseListener
public static void registerCloseListener(IBaseNotificationListener listener)
-
getInitListeners
public static Set<IBaseNotificationListener> getInitListeners()
-
registerInitListener
public static void registerInitListener(IBaseNotificationListener listener)
-
fireOpenListener
public static void fireOpenListener()
-
fireInitListener
public static void fireInitListener()
-
fireCloseListener
public static void fireCloseListener()
-
getDatasource
public static DataSource getDatasource()
-
getConnection
public static Connection getConnection() throws SQLException
- Throws:
SQLException
-
testConnection
public static boolean testConnection()
-
-