DatabaseFactory
Date: 2014-11-12

org.gcube.contentmanagement.lexicalmatcher.utils

## Class DatabaseFactory

- java.lang.Object
- - org.gcube.contentmanagement.lexicalmatcher.utils.DatabaseFactory

-     public class DatabaseFactory
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DatabaseFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<java.lang.Object>` | `executeHQLQuery(java.lang.String query, SessionFactory DBSessionFactory, boolean useSQL)`
    `static void` | `executeHQLUpdate(java.lang.String query, SessionFactory DBSessionFactory, boolean useSQL)`
    `static java.util.List<java.lang.Object>` | `executeSQLQuery(java.lang.String query, SessionFactory DBSessionFactory)`
    `static void` | `executeSQLUpdate(java.lang.String query, SessionFactory DBSessionFactory)`
    `static SessionFactory` | `initDBConnection(java.lang.String configurationFile)`
    `static SessionFactory` | `initDBConnection(java.lang.String configurationFile, LexicalEngineConfiguration config)`
    `static void` | `rollback(Session ss)`
    `static void` | `saveObject(java.lang.Object obj, SessionFactory DBSessionFactory)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DatabaseFactory

          public DatabaseFactory()

  - ### Method Detail

    - #### initDBConnection

          public static SessionFactory initDBConnection(java.lang.String configurationFile)
                                                 throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### initDBConnection

          public static SessionFactory initDBConnection(java.lang.String configurationFile,
                                        LexicalEngineConfiguration config)
                                                 throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### executeHQLQuery

          public static java.util.List<java.lang.Object> executeHQLQuery(java.lang.String query,
                                                         SessionFactory DBSessionFactory,
                                                         boolean useSQL)

    - #### executeHQLUpdate

          public static void executeHQLUpdate(java.lang.String query,
                              SessionFactory DBSessionFactory,
                              boolean useSQL)

    - #### executeSQLUpdate

          public static void executeSQLUpdate(java.lang.String query,
                              SessionFactory DBSessionFactory)

    - #### executeSQLQuery

          public static java.util.List<java.lang.Object> executeSQLQuery(java.lang.String query,
                                                         SessionFactory DBSessionFactory)

    - #### rollback

          public static void rollback(Session ss)

    - #### saveObject

          public static void saveObject(java.lang.Object obj,
                        SessionFactory DBSessionFactory)
                                 throws java.lang.Exception

      Throws:
        `java.lang.Exception`