com.espertech.esper.client.soda
Class OrderByClause

java.lang.Object
  extended by com.espertech.esper.client.soda.OrderByClause
All Implemented Interfaces:
java.io.Serializable

public class OrderByClause
extends java.lang.Object
implements java.io.Serializable

An order-by clause consists of expressions and flags indicating if ascending or descending.

See Also:
Serialized Form

Constructor Summary
OrderByClause()
          Ctor.
OrderByClause(Expression... expressions)
          Ctor.
OrderByClause(java.lang.String... properties)
          Ctor.
 
Method Summary
 OrderByClause add(Expression expression, boolean isDescending)
          Adds an expression and flag.
 OrderByClause add(java.lang.String property, boolean isDescending)
          Adds a property and flag.
static OrderByClause create()
          Create an empty order-by clause.
static OrderByClause create(Expression... expressions)
          Create an order-by clause.
static OrderByClause create(java.lang.String... properties)
          Create an order-by clause.
 java.util.List<OrderByElement> getOrderByExpressions()
          Returns a list of expressions and flags to order by.
 void setOrderByExpressions(java.util.List<OrderByElement> orderByExpressions)
          Sets a list of expressions and flags to order by.
 void toEPL(java.io.StringWriter writer)
          Renders the clause in textual representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderByClause

public OrderByClause()
Ctor.


OrderByClause

public OrderByClause(java.lang.String... properties)
Ctor.

Parameters:
properties - property names

OrderByClause

public OrderByClause(Expression... expressions)
Ctor.

Parameters:
expressions - is the expressions
Method Detail

create

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

Returns:
clause

create

public static OrderByClause create(java.lang.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(java.lang.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 java.util.List<OrderByElement> getOrderByExpressions()
Returns a list of expressions and flags to order by.

Returns:
order-by elements

setOrderByExpressions

public void setOrderByExpressions(java.util.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(java.io.StringWriter writer)
Renders the clause in textual representation.

Parameters:
writer - to output to

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com