|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.manage.DbUtil
public class DbUtil
This class is responsible to initialize the Hibernate SessionFactory that will be used in obtaining objects from the XBRL Database.
| Nested Class Summary | |
|---|---|
static class |
DbUtil.Database
Enumerates the different database engines the storage subsystem can work with. |
| Constructor Summary | |
|---|---|
DbUtil(java.util.Properties properties)
Creates a new instance of the DbUtil object. |
|
| Method Summary | |
|---|---|
DbUtil.Database |
getDatabaseType()
Reads the properties of this DBconnection and sets the database subsystem to the appropriate type. |
static java.lang.String |
getDialect(DbUtil.Database database)
|
static java.lang.String |
getDriver(DbUtil.Database database)
|
java.lang.Exception |
getLastException()
|
org.hibernate.SessionFactory |
getSessionFactory(RegisterExtraClasses[] registers)
gets or creates a session factory. |
boolean |
isDatabaseAvailable()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DbUtil(java.util.Properties properties)
properties - Properties object. Extra properties for the Hibernate connection to the database.| Method Detail |
|---|
public org.hibernate.SessionFactory getSessionFactory(RegisterExtraClasses[] registers)
The parameter is optional (can be null), if supplied it is an array of objects that implements the RegisterExtraClasse interface and this causes the configuration object to load more classes in the data model.
Returns null in case there are Hibernate exceptions during the connection to the database.
registers - Optional parameter, can be null.
public DbUtil.Database getDatabaseType()
public boolean isDatabaseAvailable()
public java.lang.Exception getLastException()
public static java.lang.String getDriver(DbUtil.Database database)
oracle -
public static java.lang.String getDialect(DbUtil.Database database)
oracle -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||