net.esper.client.soda
Class OrderByClause

java.lang.Object
  extended by net.esper.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:
Serialized Form

Constructor Summary
OrderByClause()
          Ctor.
OrderByClause(Expression... expressions)
          Ctor.
OrderByClause(String... properties)
          Ctor.
 
Method Summary
 OrderByClause add(Expression expression, boolean isDescending)
          Adds an expression and flag.
 OrderByClause add(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(String... properties)
          Create an order-by clause.
 List<OrderByElement> getOrderByExpressions()
          Returns a list of expressions and flags to order by.
 void setOrderByExpressions(List<OrderByElement> orderByExpressions)
          Sets a list of expressions and flags to order by.
 void toEQL(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(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(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

toEQL

public void toEQL(StringWriter writer)
Renders the clause in textual representation.

Parameters:
writer - to output to

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com