Class InternalEMFactory

java.lang.Object
de.xima.fc.jpa.manager.InternalEMFactory
All Implemented Interfaces:
IEMFactory

public class InternalEMFactory extends Object implements IEMFactory
Factory for creating entity manager instances, configured according to the database settings of the application.
Author:
XIMA MEDIA GmbH
  • Constructor Details

    • InternalEMFactory

      public InternalEMFactory()
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface IEMFactory
    • getDataSource

      public DataSource getDataSource()
      Specified by:
      getDataSource in interface IEMFactory
    • getDBType

      public EDatenbankTyp getDBType()
      Specified by:
      getDBType in interface IEMFactory
    • getEntityManagerFactory

      public javax.persistence.EntityManagerFactory getEntityManagerFactory()
      Specified by:
      getEntityManagerFactory in interface IEMFactory
    • getPersistenceUnitName

      public String getPersistenceUnitName()
      Specified by:
      getPersistenceUnitName in interface IEMFactory
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface IEMFactory
    • newEntityManager

      public javax.persistence.EntityManager newEntityManager()
      Specified by:
      newEntityManager in interface IEMFactory
    • open

      public void open()
      Specified by:
      open in interface IEMFactory
    • setDefaultPersistenceProperties

      public static void setDefaultPersistenceProperties(Map<? super String,? super String> properties, EDatenbankTyp dbms)
      Applies the default settings for the configuration of a persistence unit, such as the maximum number of connections, timeouts etc.
      Parameters:
      properties - Map with properties to fill with the default settings. This should then be passed to the PersistenceUnitInfo.
      dbms - Database type for which the the settings are intended.