Package org.camunda.bpm.engine.rest.dto
Class AbstractQueryDto<T extends Query<?,?>>
- java.lang.Object
-
- org.camunda.bpm.engine.rest.dto.AbstractSearchQueryDto
-
- org.camunda.bpm.engine.rest.dto.AbstractQueryDto<T>
-
- Direct Known Subclasses:
AuthorizationQueryDto
,BatchQueryDto
,BatchStatisticsQueryDto
,CaseDefinitionQueryDto
,CaseExecutionQueryDto
,CaseInstanceQueryDto
,CleanableHistoricBatchReportDto
,CleanableHistoricCaseInstanceReportDto
,CleanableHistoricDecisionInstanceReportDto
,CleanableHistoricProcessInstanceReportDto
,DecisionDefinitionQueryDto
,DecisionRequirementsDefinitionQueryDto
,DeploymentQueryDto
,EventSubscriptionQueryDto
,ExecutionQueryDto
,ExternalTaskQueryDto
,FilterQueryDto
,GroupQueryDto
,HistoricActivityInstanceQueryDto
,HistoricActivityStatisticsQueryDto
,HistoricBatchQueryDto
,HistoricCaseActivityInstanceQueryDto
,HistoricCaseInstanceQueryDto
,HistoricDecisionInstanceQueryDto
,HistoricDetailQueryDto
,HistoricExternalTaskLogQueryDto
,HistoricIdentityLinkLogQueryDto
,HistoricIncidentQueryDto
,HistoricJobLogQueryDto
,HistoricProcessInstanceQueryDto
,HistoricTaskInstanceQueryDto
,HistoricVariableInstanceQueryDto
,IncidentQueryDto
,JobDefinitionQueryDto
,JobQueryDto
,ProcessDefinitionQueryDto
,ProcessInstanceQueryDto
,SchemaLogQueryDto
,TaskQueryDto
,TenantQueryDto
,UserOperationLogQueryDto
,UserQueryDto
,VariableInstanceQueryDto
public abstract class AbstractQueryDto<T extends Query<?,?>> extends AbstractSearchQueryDto
Defines common query operations, such as sorting options and validation. Also allows to access its setter methods based onCamundaQueryParam
annotations which is used for processing Http query parameters.- Author:
- Thorben Lindhauer
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>
expressions
static String
SORT_ORDER_ASC_VALUE
static String
SORT_ORDER_DESC_VALUE
protected String
sortBy
protected List<SortingDto>
sortings
protected String
sortOrder
static List<String>
VALID_SORT_ORDER_VALUES
-
Fields inherited from class org.camunda.bpm.engine.rest.dto.AbstractSearchQueryDto
objectMapper
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryDto()
AbstractQueryDto(com.fasterxml.jackson.databind.ObjectMapper objectMapper, javax.ws.rs.core.MultivaluedMap<String,String> queryParameters)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
applyFilters(T query)
protected abstract void
applySortBy(T query, String sortBy, Map<String,Object> parameters, ProcessEngine engine)
protected void
applySortingOptions(T query, ProcessEngine engine)
protected void
applySortOrder(T query, String sortOrder)
protected abstract T
createNewQuery(ProcessEngine engine)
List<SortingDto>
getSorting()
protected abstract boolean
isValidSortByValue(String value)
void
setSortBy(String sortBy)
void
setSorting(List<SortingDto> sorting)
void
setSortOrder(String sortOrder)
protected boolean
sortOptionsValid()
static String
sortOrderValueForDirection(Direction direction)
T
toQuery(ProcessEngine engine)
-
Methods inherited from class org.camunda.bpm.engine.rest.dto.AbstractSearchQueryDto
setObjectMapper, setValueBasedOnAnnotation
-
-
-
-
Field Detail
-
SORT_ORDER_ASC_VALUE
public static final String SORT_ORDER_ASC_VALUE
- See Also:
- Constant Field Values
-
SORT_ORDER_DESC_VALUE
public static final String SORT_ORDER_DESC_VALUE
- See Also:
- Constant Field Values
-
sortBy
protected String sortBy
-
sortOrder
protected String sortOrder
-
sortings
protected List<SortingDto> sortings
-
-
Method Detail
-
setSortBy
public void setSortBy(String sortBy)
-
setSortOrder
public void setSortOrder(String sortOrder)
-
setSorting
public void setSorting(List<SortingDto> sorting)
-
getSorting
public List<SortingDto> getSorting()
-
isValidSortByValue
protected abstract boolean isValidSortByValue(String value)
-
sortOptionsValid
protected boolean sortOptionsValid()
-
toQuery
public T toQuery(ProcessEngine engine)
-
createNewQuery
protected abstract T createNewQuery(ProcessEngine engine)
-
applyFilters
protected abstract void applyFilters(T query)
-
applySortingOptions
protected void applySortingOptions(T query, ProcessEngine engine)
-
applySortBy
protected abstract void applySortBy(T query, String sortBy, Map<String,Object> parameters, ProcessEngine engine)
-
-