Package de.xima.fc.jpa.manager
Class InternalEMFactory
java.lang.Object
de.xima.fc.jpa.manager.InternalEMFactory
- All Implemented Interfaces:
IEMFactory
Factory for creating
entity manager
instances, configured according to the database settings of
the application.- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
javax.persistence.EntityManagerFactory
boolean
isOpen()
javax.persistence.EntityManager
void
open()
static void
setDefaultPersistenceProperties
(Map<? super String, ? super String> properties, EDatenbankTyp dbms) Applies the default settings for the configuration of apersistence unit
, such as the maximum number of connections, timeouts etc.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.xima.fc.jpa.IEMFactory
isConfigurable
-
Constructor Details
-
InternalEMFactory
public InternalEMFactory()
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceIEMFactory
-
getDataSource
- Specified by:
getDataSource
in interfaceIEMFactory
-
getDBType
- Specified by:
getDBType
in interfaceIEMFactory
-
getEntityManagerFactory
public javax.persistence.EntityManagerFactory getEntityManagerFactory()- Specified by:
getEntityManagerFactory
in interfaceIEMFactory
-
getPersistenceUnitName
- Specified by:
getPersistenceUnitName
in interfaceIEMFactory
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfaceIEMFactory
-
newEntityManager
public javax.persistence.EntityManager newEntityManager()- Specified by:
newEntityManager
in interfaceIEMFactory
-
open
public void open()- Specified by:
open
in interfaceIEMFactory
-
setDefaultPersistenceProperties
public static void setDefaultPersistenceProperties(Map<? super String, ? super String> properties, EDatenbankTyp dbms) Applies the default settings for the configuration of apersistence 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 thePersistenceUnitInfo
.dbms
- Database type for which the the settings are intended.
-