org.jbpm.pvm.internal.query
Class ProcessDefinitionQueryImpl

java.lang.Object
  extended by org.jbpm.pvm.internal.query.AbstractQuery
      extended by org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl
All Implemented Interfaces:
java.io.Serializable, Command<java.lang.Object>, ProcessDefinitionQuery

public class ProcessDefinitionQueryImpl
extends AbstractQuery
implements ProcessDefinitionQuery

returns partially initialized ProcessDefinitionImpl's that can only be exposed as ProcessDefinition. To get the properly initialized ProcessDefinitionImpl objects, use RepositorySession.findProcessDefinitionById(String) or RepositorySession.findProcessDefinitionByKey(String) You can use the query query capabilities in this class to find the id and then use RepositorySession.findProcessDefinitionById(String) to get the properly initialized ProcessDefinitionImpl.

Author:
Tom Baeyens
See Also:
Serialized Form

Field Summary
protected  java.lang.String deploymentId
           
protected  java.lang.String id
           
protected  java.lang.String key
           
protected  java.lang.String name
           
protected  java.lang.String nameLike
           
protected  java.lang.Boolean suspended
           
 
Fields inherited from class org.jbpm.pvm.internal.query.AbstractQuery
commandService, count, isWhereAdded, orderByClause, page, uniqueResult
 
Fields inherited from interface org.jbpm.api.ProcessDefinitionQuery
PROPERTY_DEPLOYMENT_TIMESTAMP, PROPERTY_ID, PROPERTY_KEY, PROPERTY_NAME, PROPERTY_VERSION
 
Constructor Summary
ProcessDefinitionQueryImpl()
           
 
Method Summary
protected  void applyParameters(org.hibernate.Query query)
           
 long count()
          Returns the count of the query.
 ProcessDefinitionQuery deploymentId(java.lang.String deploymentId)
           
 java.lang.Object execute(org.hibernate.Session session)
           
 java.lang.String hql()
           
 java.util.List<ProcessDefinition> list()
           
 ProcessDefinitionQuery notSuspended()
           
 ProcessDefinitionQuery orderAsc(java.lang.String property)
           
 ProcessDefinitionQuery orderDesc(java.lang.String property)
           
 ProcessDefinitionQuery page(int firstResult, int maxResults)
           
 ProcessDefinitionQuery processDefinitionId(java.lang.String id)
           
 ProcessDefinitionQuery processDefinitionKey(java.lang.String key)
           
 ProcessDefinitionQuery processDefinitionName(java.lang.String name)
           
 ProcessDefinitionQuery processDefinitionNameLike(java.lang.String name)
           
 ProcessDefinitionQuery suspended()
           
 ProcessDefinition uniqueResult()
           
 
Methods inherited from class org.jbpm.pvm.internal.query.AbstractQuery
addOrderByClause, appendOrderByClause, appendWhereClause, applyPage, execute, setCommandService, untypedList, untypedUniqueResult, writeReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

key

protected java.lang.String key

nameLike

protected java.lang.String nameLike

name

protected java.lang.String name

suspended

protected java.lang.Boolean suspended

deploymentId

protected java.lang.String deploymentId
Constructor Detail

ProcessDefinitionQueryImpl

public ProcessDefinitionQueryImpl()
Method Detail

execute

public java.lang.Object execute(org.hibernate.Session session)
Overrides:
execute in class AbstractQuery

hql

public java.lang.String hql()
Specified by:
hql in class AbstractQuery

applyParameters

protected void applyParameters(org.hibernate.Query query)
Specified by:
applyParameters in class AbstractQuery

list

public java.util.List<ProcessDefinition> list()
Specified by:
list in interface ProcessDefinitionQuery

uniqueResult

public ProcessDefinition uniqueResult()
Specified by:
uniqueResult in interface ProcessDefinitionQuery

count

public long count()
Description copied from class: AbstractQuery
Returns the count of the query. Query types that want to use this count method should - add the operation signature to their interface - use the 'count' variable in their hql() method.

Specified by:
count in interface ProcessDefinitionQuery
Overrides:
count in class AbstractQuery

processDefinitionId

public ProcessDefinitionQuery processDefinitionId(java.lang.String id)
Specified by:
processDefinitionId in interface ProcessDefinitionQuery

processDefinitionKey

public ProcessDefinitionQuery processDefinitionKey(java.lang.String key)
Specified by:
processDefinitionKey in interface ProcessDefinitionQuery

suspended

public ProcessDefinitionQuery suspended()
Specified by:
suspended in interface ProcessDefinitionQuery

notSuspended

public ProcessDefinitionQuery notSuspended()
Specified by:
notSuspended in interface ProcessDefinitionQuery

processDefinitionNameLike

public ProcessDefinitionQuery processDefinitionNameLike(java.lang.String name)
Specified by:
processDefinitionNameLike in interface ProcessDefinitionQuery

processDefinitionName

public ProcessDefinitionQuery processDefinitionName(java.lang.String name)
Specified by:
processDefinitionName in interface ProcessDefinitionQuery

deploymentId

public ProcessDefinitionQuery deploymentId(java.lang.String deploymentId)
Specified by:
deploymentId in interface ProcessDefinitionQuery

orderAsc

public ProcessDefinitionQuery orderAsc(java.lang.String property)
Specified by:
orderAsc in interface ProcessDefinitionQuery

orderDesc

public ProcessDefinitionQuery orderDesc(java.lang.String property)
Specified by:
orderDesc in interface ProcessDefinitionQuery

page

public ProcessDefinitionQuery page(int firstResult,
                                   int maxResults)
Specified by:
page in interface ProcessDefinitionQuery


Copyright © 2010 JBoss Community. All Rights Reserved.