Package org.activiti.engine.impl
Class AbstractQuery<T extends Query<?,?>,U>
java.lang.Object
org.activiti.engine.impl.db.ListQueryParameterObject
org.activiti.engine.impl.AbstractQuery<T,U>
- All Implemented Interfaces:
Serializable,Command<Object>,Query<T,U>
- Direct Known Subclasses:
AbstractVariableQueryImpl,DeadLetterJobQueryImpl,DeploymentQueryImpl,EventSubscriptionQueryImpl,HistoricActivityInstanceQueryImpl,HistoricDetailQueryImpl,HistoricVariableInstanceQueryImpl,JobQueryImpl,ModelQueryImpl,ProcessDefinitionQueryImpl,SuspendedJobQueryImpl,TimerJobQueryImpl
public abstract class AbstractQuery<T extends Query<?,?>,U>
extends ListQueryParameterObject
implements Command<Object>, Query<T,U>, Serializable
Abstract superclass for all query types.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandContextprotected CommandExecutorprotected Stringprotected AbstractQuery.NullHandlingOnOrderprotected Stringprotected QueryPropertyprotected org.activiti.engine.impl.AbstractQuery.ResultTypestatic final Stringstatic final StringFields inherited from class org.activiti.engine.impl.db.ListQueryParameterObject
firstResult, maxResults, parameter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractQuery(CommandContext commandContext) protectedAbstractQuery(CommandExecutor commandExecutor) AbstractQuery(ManagementService managementService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddOrder(String column, String sortOrder, AbstractQuery.NullHandlingOnOrder nullHandlingOnOrder) asc()Order the results ascending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).protected voidlongcount()Executes the query and returns the number of resultsdesc()Order the results descending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).execute(CommandContext commandContext) abstract longexecuteCount(CommandContext commandContext) executeList(CommandContext commandContext, Page page) Executes the actual query to retrieve the list of results.executeSingleResult(CommandContext commandContext) list()Executes the query and get a list of entities as the result.listPage(int firstResult, int maxResults) Executes the query and get a list of entities as the result.orderBy(QueryProperty property) orderBy(QueryProperty property, AbstractQuery.NullHandlingOnOrder nullHandlingOnOrder) setCommandExecutor(CommandExecutor commandExecutor) voidsetDatabaseType(String databaseType) Executes the query and returns the resulting entity or null if no entity matches the query criteria.Methods inherited from class org.activiti.engine.impl.db.ListQueryParameterObject
getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setFirstResult, setMaxResults, setParameter
-
Field Details
-
SORTORDER_ASC
- See Also:
-
SORTORDER_DESC
- See Also:
-
commandExecutor
-
commandContext
-
databaseType
-
orderBy
-
resultType
protected org.activiti.engine.impl.AbstractQuery.ResultType resultType -
orderProperty
-
nullHandlingOnOrder
-
-
Constructor Details
-
AbstractQuery
protected AbstractQuery() -
AbstractQuery
-
AbstractQuery
-
AbstractQuery
-
-
Method Details
-
setCommandExecutor
-
orderBy
Description copied from interface:Query -
orderBy
-
asc
Description copied from interface:QueryOrder the results ascending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods). -
desc
Description copied from interface:QueryOrder the results descending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods). -
direction
-
checkQueryOk
protected void checkQueryOk() -
singleResult
Description copied from interface:QueryExecutes the query and returns the resulting entity or null if no entity matches the query criteria.- Specified by:
singleResultin interfaceQuery<T extends Query<?,?>, U>
-
list
Description copied from interface:QueryExecutes the query and get a list of entities as the result. -
listPage
Description copied from interface:QueryExecutes the query and get a list of entities as the result. -
count
public long count()Description copied from interface:QueryExecutes the query and returns the number of results -
execute
-
executeCount
-
executeList
Executes the actual query to retrieve the list of results.- Parameters:
page- used if the results must be paged. If null, no paging will be applied.
-
executeSingleResult
-
addOrder
protected void addOrder(String column, String sortOrder, AbstractQuery.NullHandlingOnOrder nullHandlingOnOrder) -
getOrderBy
- Overrides:
getOrderByin classListQueryParameterObject
-
getOrderByColumns
- Overrides:
getOrderByColumnsin classListQueryParameterObject
-
getDatabaseType
- Overrides:
getDatabaseTypein classListQueryParameterObject
-
setDatabaseType
- Overrides:
setDatabaseTypein classListQueryParameterObject
-