EntityManagerFactoryCreator (training-module-library 1.0.0-4.12.0-163223 API)
Date: 2018-07-19

org.gcube.portal.trainingmodule.database

## Class EntityManagerFactoryCreator

- java.lang.Object
- - org.gcube.portal.trainingmodule.database.EntityManagerFactoryCreator

-     public class EntityManagerFactoryCreator
      extends Object

  The Class EntityManagerFactoryCreator.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 9, 2018

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CATALINA_HOME` The Constant CATALINA_HOME.
    `static org.slf4j.Logger` | `logger` The logger.
    `static String` | `PERSISTENCE_TRAINING_COURSES` The Constant PERSISTENCE_DB_GCUBE_RELEASES.
    `static String` | `PROPERTY_CATALINA_HOME` The Constant PROPERTY_CATALINA_HOME.
    `static String` | `TRAINING_COURSES_DB` The Constant TRAINING_COURSES_DB.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntityManagerFactoryCreator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ServerParameters` | `getDBParameters(String scope)` Gets the DB parameters.
    `static javax.persistence.EntityManagerFactory` | `getEntityManagerFactory(String scope)` Gets the entity manager factory.
    `static String` | `getTomcatFolder()` Gets the tomcat folder.
    `static javax.persistence.EntityManagerFactory` | `instanceFactoryCreator(String scope)` Instance factory creator.
    `static javax.persistence.EntityManagerFactory` | `instanceFactoryTestMode(String scope)` USE ONLY IN TEST MODE.

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

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

- - ### Field Detail

    - #### TRAINING_COURSES_DB

          public static final String TRAINING_COURSES_DB

      The Constant TRAINING_COURSES_DB.
      See Also:
        Constant Field Values

    - #### PERSISTENCE_TRAINING_COURSES

          public static final String PERSISTENCE_TRAINING_COURSES

      The Constant PERSISTENCE_DB_GCUBE_RELEASES.
      See Also:
        Constant Field Values

    - #### CATALINA_HOME

          public static final String CATALINA_HOME

      The Constant CATALINA_HOME.
      See Also:
        Constant Field Values

    - #### PROPERTY_CATALINA_HOME

          public static final String PROPERTY_CATALINA_HOME

      The Constant PROPERTY_CATALINA_HOME.
      See Also:
        Constant Field Values

    - #### logger

          public static org.slf4j.Logger logger

      The logger.

  - ### Constructor Detail

    - #### EntityManagerFactoryCreator

          public EntityManagerFactoryCreator()

  - ### Method Detail

    - #### instanceFactoryCreator

          public static javax.persistence.EntityManagerFactory instanceFactoryCreator(String scope)
                                                                               throws Exception

      Instance factory creator.
      Parameters:
        `scope` - the scope
      Returns:
        the entity manager factory
      Throws:
        `Exception` - the exception

    - #### instanceFactoryTestMode

          public static javax.persistence.EntityManagerFactory instanceFactoryTestMode(String scope)
                                                                                throws Exception

      USE ONLY IN TEST MODE.
      Parameters:
        `scope` - the scope
      Returns:
        the instance test mode
      Throws:
        `Exception` - the exception

    - #### getEntityManagerFactory

          public static javax.persistence.EntityManagerFactory getEntityManagerFactory(String scope)
                                                                                throws Exception

      Gets the entity manager factory.
      Parameters:
        `scope` - the scope
      Returns:
        the entity manager factory
      Throws:
        `Exception` - the exception

    - #### getTomcatFolder

          public static String getTomcatFolder()

      Gets the tomcat folder.
      Returns:
        $CATALINA_HOME

    - #### getDBParameters

          public static ServerParameters getDBParameters(String scope)
                                                  throws Exception

      Gets the DB parameters.
      Returns:
        the DB parameters
      Throws:
        `Exception`

Copyright © 2018. All Rights Reserved.