org.jbpm
Class JbpmQuery
java.lang.Object
org.jbpm.JbpmQuery
- All Implemented Interfaces:
- java.io.Serializable
- public class JbpmQuery
- extends java.lang.Object
- implements java.io.Serializable
allows to run arbitrary hibernate queries on the jbpm database.
Hibernate is the most powerfull object relational mapper. jBpm
uses this inside. Most of the queries are hidden behind methods
in the services. Since we cannot forsee every possible query that
users want, we need to have a mechanism that opens the hibernate
query capabilities to the user. Of course, its a bit more complex
to write your own queries but you'll get all the flexibility in
return.
What you need to know to start writing your own custom queries :
- the hibernate query language
- the overall jbpm datamodel diagrams (see below)
- the actual hibernate mapping files can be found at core/src/java/org/jbpm/model/.../*.hbm.xml
If you need an even more flexible querying mechanism, you can use the
hibernate session directly :
ExecutionServiceImpl executionService = (ExecutionServiceImpl) JbpmServiceFactory.getInstance().openExecutionService(actorId);
HibernateSession hibernateSession = (HibernateSession) executionService.getPersistenceSession();
net.sf.hibernate.Session session = hibernateSession.getHibernateSession();
- See Also:
- Serialized Form
|
Field Summary |
static org.jbpm.impl.QueryParameterType |
LONG
|
static org.jbpm.impl.QueryParameterType |
STRING
|
|
Constructor Summary |
JbpmQuery(java.lang.String queryText)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STRING
public static final org.jbpm.impl.QueryParameterType STRING
LONG
public static final org.jbpm.impl.QueryParameterType LONG
JbpmQuery
public JbpmQuery(java.lang.String queryText)
addParameter
public void addParameter(java.lang.String name,
java.lang.Object value,
org.jbpm.impl.QueryParameterType type)
addParameter
public void addParameter(java.lang.String name,
java.lang.Object value)
getQueryParameters
public java.util.List getQueryParameters()
getQueryText
public java.lang.String getQueryText()
Version : jbpm-2.0