Class OrderByClause

java.lang.Object
com.espertech.esper.common.client.soda.OrderByClause
All Implemented Interfaces:
Serializable

public class OrderByClause extends Object implements Serializable
An order-by clause consists of expressions and flags indicating if ascending or descending.
See Also:
  • Constructor Details

    • OrderByClause

      public OrderByClause()
      Ctor.
    • OrderByClause

      public OrderByClause(String... properties)
      Ctor.
      Parameters:
      properties - property names
    • OrderByClause

      public OrderByClause(Expression... expressions)
      Ctor.
      Parameters:
      expressions - is the expressions
  • Method Details

    • create

      public static OrderByClause create()
      Create an empty order-by clause.
      Returns:
      clause
    • create

      public static OrderByClause create(String... properties)
      Create an order-by clause.
      Parameters:
      properties - is the property names to order by
      Returns:
      clause
    • create

      public static OrderByClause create(Expression... expressions)
      Create an order-by clause.
      Parameters:
      expressions - is the expressios returning values to order by
      Returns:
      clause
    • add

      public OrderByClause add(String property, boolean isDescending)
      Adds a property and flag.
      Parameters:
      property - is the name of the property to add
      isDescending - true for descending, false for ascending sort
      Returns:
      clause
    • add

      public OrderByClause add(Expression expression, boolean isDescending)
      Adds an expression and flag.
      Parameters:
      expression - returns values to order by
      isDescending - true for descending, false for ascending sort
      Returns:
      clause
    • getOrderByExpressions

      public List<OrderByElement> getOrderByExpressions()
      Returns a list of expressions and flags to order by.
      Returns:
      order-by elements
    • setOrderByExpressions

      public void setOrderByExpressions(List<OrderByElement> orderByExpressions)
      Sets a list of expressions and flags to order by.
      Parameters:
      orderByExpressions - is the expressions to order by
    • toEPL

      public void toEPL(StringWriter writer)
      Renders the clause in textual representation.
      Parameters:
      writer - to output to