Class CaseQuery.StringValueOrderByColumnQuery

All Implemented Interfaces:
CaseQuery.IOrderByQueryColumns
Enclosing class:
CaseQuery

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

    • values

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

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

      Example:

      TaskQuery.create().orderBy().customField().stringField("ProductKind").values(List.of("Food", "Hardware", "Clothes"))

      SQL part: ORDER BY CASE WHEN ProductKind='Food' THEN 0 WHEN PrroductKind='Hardware' THEN 1 WHEN ProductKind='Clothes' THEN 2 ELSE 3 END ASC

      Parameters:
      valueOrder - List of strings 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(String... valueOrder)

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

      Example:

      TaskQuery.create().orderBy().customField().stringField("ProductKind").values("Food", "Hardware", "Clothes")

      SQL part: ORDER BY CASE WHEN ProductKind='Food' THEN 0 WHEN PrroductKind='Hardware' THEN 1 WHEN ProductKind='Clothes' THEN 2 ELSE 3 END ASC

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