Class TaskQuery.EnumValueOrderByColumnQuery<T extends ch.ivyteam.ivy.persistence.IPersistentEnumeration>

All Implemented Interfaces:
TaskQuery.IOrderByQueryColumns
Enclosing class:
TaskQuery

public class TaskQuery.EnumValueOrderByColumnQuery<T extends ch.ivyteam.ivy.persistence.IPersistentEnumeration> extends TaskQuery.OrderByColumnQuery
API:
This is a public API.
  • Method Details

    • values

      public TaskQuery.OrderByColumnQuery values(List<T> valueOrder)

      Adds an order by statement for the specified column in the order of the given values.

      Example:

      TaskQuery.create().orderBy().priority().values(List.of(WorkflowPriority.NORMAL, WorkflowPriority.EXCEPTION, WorkflowPriority.LOW, WorkflowPriority.HIGH))

      SQL part: ORDER BY CASE WHEN Priority=2 THEN 0 WHEN Priority=0 THEN 1 WHEN Priority=3 THEN 2 WHEN Priority=1 THEN 3 ELSE 4 END ASC

      Parameters:
      valueOrder - List of values that define the order of the result
      Returns:
      query for further composition
      API:
      This public API is available in Java.
    • values

      public TaskQuery.OrderByColumnQuery values(T... valueOrder)

      Adds an order by statement for the specified column in the order of the given values.

      Example:

      TaskQuery.create().orderBy().priority().values(WorkflowPriority.NORMAL, WorkflowPriority.EXCEPTION, WorkflowPriority.LOW, WorkflowPriority.HIGH)

      SQL part: ORDER BY CASE WHEN Priority=2 THEN 0 WHEN Priority=0 THEN 1 WHEN Priority=3 THEN 2 WHEN Priority=1 THEN 3 ELSE 4 END ASC

      Parameters:
      valueOrder - List of values that define the order of the result
      Returns:
      query for further composition
      API:
      This public API is available in Java.