Search in sources :

Example 1 with SortingDto

use of org.camunda.bpm.engine.rest.dto.SortingDto in project camunda-bpm-platform by camunda.

the class TaskQueryDto method convertVariableOrderPropertyToSortingDto.

public static SortingDto convertVariableOrderPropertyToSortingDto(VariableOrderProperty variableOrderProperty) {
    SortingDto sortingDto = new SortingDto();
    sortingDto.setSortBy(sortByValueForVariableOrderProperty(variableOrderProperty));
    sortingDto.setSortOrder(sortOrderValueForDirection(variableOrderProperty.getDirection()));
    sortingDto.setParameters(sortParametersForVariableOrderProperty(variableOrderProperty));
    return sortingDto;
}
Also used : SortingDto(org.camunda.bpm.engine.rest.dto.SortingDto)

Example 2 with SortingDto

use of org.camunda.bpm.engine.rest.dto.SortingDto in project camunda-bpm-platform by camunda.

the class TaskQueryDto method convertQueryOrderingPropertiesToSortingDtos.

public static List<SortingDto> convertQueryOrderingPropertiesToSortingDtos(List<QueryOrderingProperty> orderingProperties) {
    List<SortingDto> sortingDtos = new ArrayList<SortingDto>();
    for (QueryOrderingProperty orderingProperty : orderingProperties) {
        SortingDto sortingDto;
        if (orderingProperty instanceof VariableOrderProperty) {
            sortingDto = convertVariableOrderPropertyToSortingDto((VariableOrderProperty) orderingProperty);
        } else {
            sortingDto = convertQueryOrderingPropertyToSortingDto(orderingProperty);
        }
        sortingDtos.add(sortingDto);
    }
    return sortingDtos;
}
Also used : SortingDto(org.camunda.bpm.engine.rest.dto.SortingDto) ArrayList(java.util.ArrayList) QueryOrderingProperty(org.camunda.bpm.engine.impl.QueryOrderingProperty) VariableOrderProperty(org.camunda.bpm.engine.impl.VariableOrderProperty)

Example 3 with SortingDto

use of org.camunda.bpm.engine.rest.dto.SortingDto in project camunda-bpm-platform by camunda.

the class TaskQueryDto method convertQueryOrderingPropertyToSortingDto.

public static SortingDto convertQueryOrderingPropertyToSortingDto(QueryOrderingProperty orderingProperty) {
    SortingDto sortingDto = new SortingDto();
    sortingDto.setSortBy(sortByValueForQueryProperty(orderingProperty.getQueryProperty()));
    sortingDto.setSortOrder(sortOrderValueForDirection(orderingProperty.getDirection()));
    return sortingDto;
}
Also used : SortingDto(org.camunda.bpm.engine.rest.dto.SortingDto)

Aggregations

SortingDto (org.camunda.bpm.engine.rest.dto.SortingDto)3 ArrayList (java.util.ArrayList)1 QueryOrderingProperty (org.camunda.bpm.engine.impl.QueryOrderingProperty)1 VariableOrderProperty (org.camunda.bpm.engine.impl.VariableOrderProperty)1