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 TypeMethodDescriptionvoidclose()javax.persistence.EntityManagerFactorybooleanisOpen()javax.persistence.EntityManagervoidopen()static voidsetDefaultPersistenceProperties(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, waitMethods inherited from interface de.xima.fc.jpa.IEMFactory
isConfigurable
-
Constructor Details
-
InternalEMFactory
public InternalEMFactory()
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceIEMFactory
-
getDataSource
- Specified by:
getDataSourcein interfaceIEMFactory
-
getDBType
- Specified by:
getDBTypein interfaceIEMFactory
-
getEntityManagerFactory
public javax.persistence.EntityManagerFactory getEntityManagerFactory()- Specified by:
getEntityManagerFactoryin interfaceIEMFactory
-
getPersistenceUnitName
- Specified by:
getPersistenceUnitNamein interfaceIEMFactory
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceIEMFactory
-
newEntityManager
public javax.persistence.EntityManager newEntityManager()- Specified by:
newEntityManagerin interfaceIEMFactory
-
open
public void open()- Specified by:
openin 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.
-