Class Config

java.lang.Object
NTNU.IDATT1002.Config

public class Config
extends java.lang.Object
Application Configuration Singleton for parsing hibernate persistence properties and Google Maps API key. Provides a single global access point to the applications EntityManagerFactory.
  • Method Summary

    Modifier and Type Method Description
    static void closeEntityManagerFactory()
    Close the EntityManager instance.
    static javax.persistence.EntityManager createEntityManager()
    Retrieve a new EntityManager instance.
    static java.lang.String getGoogleApiKey()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getGoogleApiKey

      public static java.lang.String getGoogleApiKey()
    • closeEntityManagerFactory

      public static void closeEntityManagerFactory()
      Close the EntityManager instance.
    • createEntityManager

      public static javax.persistence.EntityManager createEntityManager()
      Retrieve a new EntityManager instance. An EntityManagerFactory is not created until it is requested.
      Returns:
      an entity manager instance