Package de.xima.fc.filter.db
Class PluginEntityContext
- java.lang.Object
-
- de.xima.fc.filter.db.PluginEntityContext
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IBaseEntityContext
,Closeable
,AutoCloseable
public class PluginEntityContext extends Object implements de.xima.cmn.dao.interfaces.IBaseEntityContext, AutoCloseable, Closeable
An entity context for use by an entities plugin. Normally, you should not create this context manually, useIPluginEmManager.newEntityContext()
instead.This entity context implements
AutoCloseable
. Calling theclose()
will close theEntityManager
if- the entity manager was created by this class during a call to
getEm()
; and - we are currently not within the context of an HTTP request that is managed by the
ConnectionFilter
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description PluginEntityContext(javax.persistence.EntityManagerFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
javax.persistence.EntityManager
getEm()
boolean
isOpen()
-
-
-
Method Detail
-
getEm
public javax.persistence.EntityManager getEm()
- Specified by:
getEm
in interfacede.xima.cmn.dao.interfaces.IBaseEntityContext
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfacede.xima.cmn.dao.interfaces.IBaseEntityContext
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacede.xima.cmn.dao.interfaces.IBaseEntityContext
-
-