Class CaseQuery.LongValueOrderByColumnQuery

All Implemented Interfaces:
CaseQuery.IOrderByQueryColumns
Enclosing class:
CaseQuery

public class CaseQuery.LongValueOrderByColumnQuery extends CaseQuery.OrderByColumnQuery
API:
This is a public API.
  • Method Details

    • values

      public CaseQuery.OrderByColumnQuery values(List<Long> valueOrder)

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

      Example:

      TaskQuery.create().orderBy().customField().numberField("ProductKind").values(List.of(20, 30, 10))

      SQL part: ORDER BY CASE WHEN ProductKind=20 THEN 0 WHEN PrroductKind=30 THEN 1 WHEN ProductKind=10 THEN 2 ELSE 3 END ASC

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

      public CaseQuery.OrderByColumnQuery values(long... valueOrder)

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

      Example:

      TaskQuery.create().orderBy().customField().numberField("ProductKind").values(20, 30, 10)

      SQL part: ORDER BY CASE WHEN ProductKind=20 THEN 0 WHEN PrroductKind=30 THEN 1 WHEN ProductKind=10 THEN 2 ELSE 3 END ASC

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