|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbpm.task.service.persistence.TaskPersistenceManager
public class TaskPersistenceManager
From the Hibernate docs:
An EntityManager is an inexpensive, non-threadsafe object that should be used once, for a single business process, a single unit of work, and then discarded. An EntityManager will not obtain a JDBC Connection (or a Datasource) unless it is needed, so you may safely open and close an EntityManager even if you are not sure that data access will be needed to serve a particular request.This class is a wrapper around the entity manager that handles all persistence operations. This way, the persistence functionality can be isolated from the human-task server functionality. This class is only mean to be used in one thread: with every request handled by the human-task server, a TaskServiceSession is created with an instance of this class. Once the request has been handled, the TaskServiceSession instance and the TaskPersistenceManager instance are disposed of.
Method Summary | |
---|---|
boolean |
beginTransaction()
|
javax.persistence.Query |
createNewQuery(String queryString)
|
javax.persistence.Query |
createQuery(String queryName)
|
void |
deleteEntity(Object entity)
|
void |
dispose()
|
void |
endPersistenceContext()
|
void |
endTransaction(boolean txOwner)
|
Object |
findEntity(Class<?> entityClass,
Object primaryKey)
|
List<DeadlineSummary> |
getUnescalatedDeadlines()
Special onetime method |
List<DeadlineSummary> |
getUnescalatedDeadlinesList()
|
boolean |
groupExists(String groupId)
|
List<TaskSummary> |
queryTasksWithUserIdAndLanguage(String queryName,
String userId,
String language)
|
List<TaskSummary> |
queryTasksWithUserIdStatusAndLanguage(String queryName,
String userId,
List<Status> status,
String language)
|
void |
rollBackTransaction(boolean txOwner)
|
void |
saveEntity(Object entity)
|
void |
setTaskStatusInTransaction(Object taskId,
Status taskStatus)
Special onetime method |
boolean |
userExists(String userId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean beginTransaction()
public void endTransaction(boolean txOwner)
public void rollBackTransaction(boolean txOwner)
public void dispose()
public void endPersistenceContext()
public List<DeadlineSummary> getUnescalatedDeadlines()
public void setTaskStatusInTransaction(Object taskId, Status taskStatus)
taskId
- taskStatus
- public List<DeadlineSummary> getUnescalatedDeadlinesList()
public Object findEntity(Class<?> entityClass, Object primaryKey)
public void deleteEntity(Object entity)
public void saveEntity(Object entity)
public javax.persistence.Query createQuery(String queryName)
public javax.persistence.Query createNewQuery(String queryString)
public boolean userExists(String userId)
public boolean groupExists(String groupId)
public List<TaskSummary> queryTasksWithUserIdAndLanguage(String queryName, String userId, String language)
public List<TaskSummary> queryTasksWithUserIdStatusAndLanguage(String queryName, String userId, List<Status> status, String language)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |