com.sap.caf.rt.bol.util

Class OrderBy

java.lang.Object
  extended by com.sap.caf.rt.bol.util.OrderBy

public class OrderBy
extends Object

Represents a list of attributes that should be used to sort the result of a query


Constructor Summary
OrderBy()
          Constructs empty instance
OrderBy(String attributeName)
          Constructs order by clause for a single attribute in ascending order.
OrderBy(String attributeName, Order order)
          Constructs order by clause for a single attribute.
 
Method Summary
 OrderBy add(String attributeName)
          Adds attribute to be used for sorting
 OrderBy add(String attributeName, Order order)
          Adds attribute to be used for sorting
 List<OrderByEntry> getEntries()
          Returns a list of attributes-order pairs that will be used for sorting
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrderBy

public OrderBy()
Constructs empty instance


OrderBy

public OrderBy(String attributeName,
               Order order)
Constructs order by clause for a single attribute. Further attributes may be added using the add() methods

Parameters:
attributeName - the name of the attribute to be used for sorting
order - either of Order.ASC or Order.DESC

OrderBy

public OrderBy(String attributeName)
Constructs order by clause for a single attribute in ascending order. Further attributes may be added using the add() methods

Parameters:
attributeName - the name of the attribute to be used for sorting
Method Detail

add

public OrderBy add(String attributeName,
                   Order order)
Adds attribute to be used for sorting

Parameters:
attributeName - the name of the attribute to be used for sorting
order - either of Order.ASC or Order.DESC
Returns:
this instance

add

public OrderBy add(String attributeName)
Adds attribute to be used for sorting

Parameters:
attributeName - the name of the attribute to be used for sorting
Returns:
this instance

getEntries

public List<OrderByEntry> getEntries()
Returns a list of attributes-order pairs that will be used for sorting

Returns:
a list of attributes-order pairs that will be used for sorting

toString

public String toString()
Overrides:
toString in class Object
Access Rights

This class can be accessed from:


SC DC
[sap.com] CAF [sap.com] caf/runtime/ear


Copyright 2010 SAP AG Complete Copyright Notice