public abstract class AbstractQuery<T extends Query<?,?>,U> extends ListQueryParameterObject implements Command<Object>, Query<T,U>, Serializable
Modifier and Type | Field and Description |
---|---|
protected CommandContext |
commandContext |
protected CommandExecutor |
commandExecutor |
protected String |
orderBy |
protected QueryProperty |
orderProperty |
protected org.camunda.bpm.engine.impl.AbstractQuery.ResultType |
resultType |
static String |
SORTORDER_ASC |
static String |
SORTORDER_DESC |
databaseType, firstResult, maxResults, parameter
authDefaultPerm, authGroupIds, authPerms, authResourceId, authResourceIdQueryParam, authResourceType, authUserId, isAuthorizationCheckEnabled
Modifier | Constructor and Description |
---|---|
protected |
AbstractQuery() |
|
AbstractQuery(CommandContext commandContext) |
protected |
AbstractQuery(CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
protected void |
addOrder(String column,
String sortOrder) |
T |
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 void |
assertParamNotNull(String paramName,
Object value) |
protected void |
assertParamNotNull(String paramName,
Object[] values) |
protected void |
checkQueryOk() |
long |
count()
Executes the query and returns the number of results
|
T |
desc()
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).
|
T |
direction(Direction direction) |
Object |
execute(CommandContext commandContext) |
abstract long |
executeCount(CommandContext commandContext) |
abstract List<U> |
executeList(CommandContext commandContext,
Page page)
Executes the actual query to retrieve the list of results.
|
U |
executeSingleResult(CommandContext commandContext) |
String |
getOrderBy() |
List<U> |
list()
Executes the query and get a list of entities as the result.
|
List<U> |
listPage(int firstResult,
int maxResults)
Executes the query and get a list of entities as the result.
|
T |
orderBy(QueryProperty property) |
AbstractQuery<T,U> |
setCommandExecutor(CommandExecutor commandExecutor) |
U |
singleResult()
Executes the query and returns the resulting entity or null if no
entity matches the query criteria.
|
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, setParameter
getAuthDefaultPerm, getAuthGroupIds, getAuthPerms, getAuthResourceId, getAuthResourceIdQueryParam, getAuthResourceType, getAuthUserId, isAuthorizationCheckEnabled, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthPerms, setAuthResourceId, setAuthResourceIdQueryParam, setAuthResourceType, setAuthUserId
public static final String SORTORDER_ASC
public static final String SORTORDER_DESC
protected transient CommandExecutor commandExecutor
protected transient CommandContext commandContext
protected String orderBy
protected org.camunda.bpm.engine.impl.AbstractQuery.ResultType resultType
protected QueryProperty orderProperty
protected AbstractQuery()
protected AbstractQuery(CommandExecutor commandExecutor)
public AbstractQuery(CommandContext commandContext)
public AbstractQuery<T,U> setCommandExecutor(CommandExecutor commandExecutor)
public T orderBy(QueryProperty property)
public T asc()
Query
public T desc()
Query
protected void checkQueryOk()
public U singleResult()
Query
singleResult
in interface Query<T extends Query<?,?>,U>
public List<U> list()
Query
public List<U> listPage(int firstResult, int maxResults)
Query
public long count()
Query
public Object execute(CommandContext commandContext)
public abstract long executeCount(CommandContext commandContext)
public abstract List<U> executeList(CommandContext commandContext, Page page)
page
- used if the results must be paged. If null, no paging will be applied.public U executeSingleResult(CommandContext commandContext)
public String getOrderBy()
getOrderBy
in class ListQueryParameterObject
Copyright © 2015. All rights reserved.