Package de.xima.fc.jpa.manager
Class InternalEMFactory
- java.lang.Object
-
- de.xima.fc.jpa.manager.InternalEMFactory
-
- All Implemented Interfaces:
IEMFactory
public class InternalEMFactory extends Object implements IEMFactory
Factory for creatingentity manager
instances, configured according to the database settings of the application.- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description InternalEMFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
DataSource
getDataSource()
EDatenbankTyp
getDBType()
javax.persistence.EntityManagerFactory
getEntityManagerFactory()
String
getPersistenceUnitName()
boolean
isOpen()
javax.persistence.EntityManager
newEntityManager()
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
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceIEMFactory
-
getDataSource
public DataSource getDataSource()
- Specified by:
getDataSource
in interfaceIEMFactory
-
getDBType
public EDatenbankTyp getDBType()
- Specified by:
getDBType
in interfaceIEMFactory
-
getEntityManagerFactory
public javax.persistence.EntityManagerFactory getEntityManagerFactory()
- Specified by:
getEntityManagerFactory
in interfaceIEMFactory
-
getPersistenceUnitName
public String 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.
-
-