public class DatabaseBundleInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATE_FORMAT |
Constructor and Description |
---|
DatabaseBundleInfo() |
Modifier and Type | Method and Description |
---|---|
static void |
closeSessionFactory()
Closes the current session factory.
|
static org.hibernate.cfg.Configuration |
getConfiguration()
Returns the configuration for the hibernate connection.
|
static java.lang.String |
getDatabaseSystem()
Returns the current database system to be used with hibernate.
|
static java.text.SimpleDateFormat |
getDateFormatter()
Returns the date formatter for the EOm database bundle
|
static IEclipsePreferences |
getEclipsePreferences()
Returns the eclipse preferences.
|
static int |
getHibernateBatchSize()
Gets the hibernate batch size.
|
static javax.swing.ImageIcon |
getImageIcon(java.lang.String fileName)
Gets the image icon for the specified image.
|
static java.lang.String |
getImagePackage()
Gets the image package location as String.
|
static org.osgi.framework.Bundle |
getLocalBundle()
Gets the local bundle.
|
static org.hibernate.Session |
getNewDatabaseSession()
Gets the new hibernate database session.
|
static org.hibernate.Session |
getNewDatabaseSession(boolean isResetSessionFactory)
Gets the new hibernate database session.
|
static org.hibernate.SessionFactory |
getSessionFactory()
Returns the hibernate session factory.
|
static org.hibernate.SessionFactory |
getSessionFactory(boolean doSilentConnectionCheck)
Returns the hibernate session factory.
|
static org.hibernate.SessionFactory |
getSessionFactory(boolean isResetSessionFactory,
boolean doSilentConnectionCheck)
Returns the hibernate session factory.
|
static de.enflexit.db.hibernate.SessionFactoryMonitor |
getSessionFactoryMonitor()
Returns the session factory monitor.
|
static void |
setDatabaseSystem(java.lang.String newDatabaseSystem)
Sets the database system to be used.
|
static void |
setEclipsePreferencesForDatabaseConnection(java.util.Properties hibernateDatabaseSettings)
Sets the eclipse preferences for the EOM database connection.
|
static void |
setLocalBundle(org.osgi.framework.Bundle localBundle)
Sets the local bundle.
|
static void |
setStatisticsEnabled(boolean setEnabled)
Sets the statistics for the SessionFactory enabled (or not).
|
static void |
startSessionFactory(boolean isResetSessionFactory,
boolean doSilentConnectionCheck)
Start the EOM SessionFactory within an extra thread.
|
static void |
writeStatistics()
Write the SessionFactory statistics.
|
public static final java.lang.String DATE_FORMAT
public static java.lang.String getDatabaseSystem()
public static void setDatabaseSystem(java.lang.String newDatabaseSystem)
newDatabaseSystem
- the new database systempublic static void setEclipsePreferencesForDatabaseConnection(java.util.Properties hibernateDatabaseSettings)
hibernateDatabaseSettings
- the new eclipse preferences for the database connectionpublic static IEclipsePreferences getEclipsePreferences()
public static de.enflexit.db.hibernate.SessionFactoryMonitor getSessionFactoryMonitor()
public static org.hibernate.Session getNewDatabaseSession()
public static org.hibernate.Session getNewDatabaseSession(boolean isResetSessionFactory)
isResetSessionFactory
- the reset session factorypublic static void startSessionFactory(boolean isResetSessionFactory, boolean doSilentConnectionCheck)
isResetSessionFactory
- the is reset session factorydoSilentConnectionCheck
- the do silent connection checkpublic static void closeSessionFactory()
public static void setStatisticsEnabled(boolean setEnabled)
setEnabled
- the set enabledpublic static void writeStatistics()
public static org.hibernate.SessionFactory getSessionFactory()
public static org.hibernate.SessionFactory getSessionFactory(boolean doSilentConnectionCheck)
doSilentConnectionCheck
- set true, if you want to make a silent connection checkpublic static org.hibernate.SessionFactory getSessionFactory(boolean isResetSessionFactory, boolean doSilentConnectionCheck)
isResetSessionFactory
- the is reset session factorydoSilentConnectionCheck
- set true, if you want to make a silent connection checkpublic static org.hibernate.cfg.Configuration getConfiguration()
public static int getHibernateBatchSize()
public static org.osgi.framework.Bundle getLocalBundle()
public static void setLocalBundle(org.osgi.framework.Bundle localBundle)
localBundle
- the new local bundlepublic static java.text.SimpleDateFormat getDateFormatter()
public static java.lang.String getImagePackage()
public static javax.swing.ImageIcon getImageIcon(java.lang.String fileName)
dbDescription
- the file name