org.jbpm.pvm.internal.query
Class AbstractQuery

java.lang.Object
  extended by org.jbpm.pvm.internal.query.AbstractQuery
All Implemented Interfaces:
java.io.Serializable, Command<java.lang.Object>
Direct Known Subclasses:
DeploymentQueryImpl, HistoryActivityInstanceQueryImpl, HistoryDetailQueryImpl, HistoryProcessInstanceQueryImpl, HistoryTaskQueryImpl, JobQueryImpl, ProcessDefinitionQueryImpl, ProcessInstanceQueryImpl, TaskQueryImpl

public abstract class AbstractQuery
extends java.lang.Object
implements Command<java.lang.Object>

Author:
Tom Baeyens
See Also:
Serialized Form

Field Summary
protected  CommandService commandService
           
protected  boolean count
           
protected  boolean isWhereAdded
           
protected  java.lang.String orderByClause
           
protected  Page page
           
protected  boolean uniqueResult
           
 
Constructor Summary
AbstractQuery()
           
 
Method Summary
protected  void addOrderByClause(java.lang.String clause)
           
protected  void appendOrderByClause(java.lang.StringBuilder hql)
           
protected  void appendWhereClause(java.lang.String whereClause, java.lang.StringBuilder hql)
           
protected  void applyPage(org.hibernate.Query query)
           
protected abstract  void applyParameters(org.hibernate.Query query)
           
 long count()
          Returns the count of the query.
 java.lang.Object execute(Environment environment)
           
 java.lang.Object execute(org.hibernate.Session session)
           
abstract  java.lang.String hql()
           
 void setCommandService(CommandService commandService)
           
 java.util.List<?> untypedList()
           
protected  java.lang.Object untypedUniqueResult()
           
protected  java.lang.Object writeReplace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandService

protected CommandService commandService

orderByClause

protected java.lang.String orderByClause

page

protected Page page

isWhereAdded

protected boolean isWhereAdded

count

protected boolean count

uniqueResult

protected boolean uniqueResult
Constructor Detail

AbstractQuery

public AbstractQuery()
Method Detail

applyParameters

protected abstract void applyParameters(org.hibernate.Query query)

hql

public abstract java.lang.String hql()

untypedList

public java.util.List<?> untypedList()

untypedUniqueResult

protected java.lang.Object untypedUniqueResult()

execute

public java.lang.Object execute(Environment environment)
                         throws java.lang.Exception
Specified by:
execute in interface Command<java.lang.Object>
Throws:
java.lang.Exception

execute

public java.lang.Object execute(org.hibernate.Session session)

count

public long count()
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.


appendWhereClause

protected void appendWhereClause(java.lang.String whereClause,
                                 java.lang.StringBuilder hql)

appendOrderByClause

protected void appendOrderByClause(java.lang.StringBuilder hql)

applyPage

protected void applyPage(org.hibernate.Query query)

addOrderByClause

protected void addOrderByClause(java.lang.String clause)

writeReplace

protected java.lang.Object writeReplace()
                                 throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException

setCommandService

public void setCommandService(CommandService commandService)


Copyright © 2010 JBoss Community. All Rights Reserved.