public final class CmsDbContext extends CmsDbContext
| 限定符和类型 | 字段和说明 |
|---|---|
protected javax.persistence.EntityManager |
m_entityManager
The EntityManager instance for this context.
|
protected boolean |
m_shouldCommit
Tells when the current transaction should be commit or rollback.
|
m_attributes, m_flexRequestContextInfo, m_projectId, m_requestContext| 构造器和说明 |
|---|
CmsDbContext()
Creates a new, empty database context.
|
CmsDbContext(CmsRequestContext context)
Creates a new database context initialized with the given user request context.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clears this database context.
|
javax.persistence.EntityManager |
getEntityManager()
Returns the entity manager of this db context.
|
void |
report(I_CmsReport report,
CmsMessageContainer message,
java.lang.Throwable throwable)
Reports an error to the given report (if available) and to the OpenCms log file.
|
void |
rollback()
Rollback current transaction and starts new.
|
currentProject, currentUser, getAttribute, getFlexRequestContextInfo, getHistoryDriver, getProjectDriver, getProjectId, getRequestContext, getUserDriver, getVfsDriver, isDefaultDbContext, pop, removeAttribute, removeSiteRoot, setAttribute, setProjectId, throwExceptionprotected javax.persistence.EntityManager m_entityManager
protected boolean m_shouldCommit
public CmsDbContext()
public CmsDbContext(CmsRequestContext context)
context - the current users request contextpublic void clear()
clear 在类中 CmsDbContextpublic javax.persistence.EntityManager getEntityManager()
public void report(I_CmsReport report, CmsMessageContainer message, java.lang.Throwable throwable) throws CmsVfsException, CmsException
report 在类中 CmsDbContextreport - the report to write the error tomessage - the message to write to the report / logthrowable - the exception to write to the report / logCmsException - if the throwable parameter is not null and a CmsExceptionCmsVfsException - if the throwable parameter is not null and no CmsExceptionpublic void rollback()
rollback 在类中 CmsDbContext