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 java.util.Map<java.lang.String,java.lang.String>
expressions
static java.lang.String
SORT_ORDER_ASC_VALUE
static java.lang.String
SORT_ORDER_DESC_VALUE
protected java.lang.String
sortBy
protected java.util.List<SortingDto>
sortings
protected java.lang.String
sortOrder
static java.util.List<java.lang.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<java.lang.String,java.lang.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, java.lang.String sortBy, java.util.Map<java.lang.String,java.lang.Object> parameters, ProcessEngine engine)
protected void
applySortingOptions(T query, ProcessEngine engine)
protected void
applySortOrder(T query, java.lang.String sortOrder)
protected abstract T
createNewQuery(ProcessEngine engine)
java.util.List<SortingDto>
getSorting()
protected abstract boolean
isValidSortByValue(java.lang.String value)
void
setSortBy(java.lang.String sortBy)
void
setSorting(java.util.List<SortingDto> sorting)
void
setSortOrder(java.lang.String sortOrder)
protected boolean
sortOptionsValid()
static java.lang.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 java.lang.String SORT_ORDER_ASC_VALUE
- See Also:
- Constant Field Values
-
SORT_ORDER_DESC_VALUE
public static final java.lang.String SORT_ORDER_DESC_VALUE
- See Also:
- Constant Field Values
-
VALID_SORT_ORDER_VALUES
public static final java.util.List<java.lang.String> VALID_SORT_ORDER_VALUES
-
sortBy
protected java.lang.String sortBy
-
sortOrder
protected java.lang.String sortOrder
-
sortings
protected java.util.List<SortingDto> sortings
-
expressions
protected java.util.Map<java.lang.String,java.lang.String> expressions
-
-
Method Detail
-
setSortBy
public void setSortBy(java.lang.String sortBy)
-
setSortOrder
public void setSortOrder(java.lang.String sortOrder)
-
setSorting
public void setSorting(java.util.List<SortingDto> sorting)
-
getSorting
public java.util.List<SortingDto> getSorting()
-
isValidSortByValue
protected abstract boolean isValidSortByValue(java.lang.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, java.lang.String sortBy, java.util.Map<java.lang.String,java.lang.Object> parameters, ProcessEngine engine)
-
applySortOrder
protected void applySortOrder(T query, java.lang.String sortOrder)
-
sortOrderValueForDirection
public static java.lang.String sortOrderValueForDirection(Direction direction)
-
-