com.sap.ip.me.api.smartsync
Interface RowList

All Superinterfaces:
RowCollection

public interface RowList
extends RowCollection

A RowList is a collection of Row entities. It contains components that can be accessed using an query or a integer index.The rows in the list can also be sorted according to a sort order.

Example :
Using a query to retrieve a list of rows. Where rowList is the given RowList and dateFielddesc is a field descriptor of a date field .

   Condition condition = queryFactory.createCondition(dateFielddesc, RelationalOperatorType.GREATER_THAN, java.sql.Date.valueOf("1999-12-25"));
   Query query = queryFactory.createQuery(rowDescriptor, condition);
   RowList queryRowList = rowList.getRelatingRows(query);
 
queryRowList contains the rows that satisfy the query condition. Sorting the rows in the row list according to some condition.
  //sort in SYNC_KEY field in ascending order
  Condition sortOrder = queryFactory.createSortOrder(syncKeyFieldDescriptor,true);
  RowList sortedRowList = rowList.sort(sortOrder);
 
sortedRowList contains the sorted rows.

Since:
2.1
Author:
SAP

Method Summary
 Row get(int index)
          Returns the Row entity at the specified index.
 RowList getRowList(Query query)
          Returns the RowList collection complying to the condition set in the query
 void sort(SortOrder sortOrder)
          Sorts the Row entities according to the specified SortOrder.
 
Methods inherited from interface com.sap.ip.me.api.smartsync.RowCollection
contains, get, iterator, size
 

Method Detail

get

public Row get(int index)
Returns the Row entity at the specified index.

Parameters:
index - an index into this RowList
Returns:
the Row entity at the specified index

getRowList

public RowList getRowList(Query query)
Returns the RowList collection complying to the condition set in the query

Parameters:
query - the query object which holds the condition/s
Returns:
the RowList collection complying to the queried condition

sort

public void sort(SortOrder sortOrder)
Sorts the Row entities according to the specified SortOrder.

Parameters:
sortOrder - the SortOrder specifying the sort field and order. May contain multiple SortOrder objects.


Copyright © 2005 SAP AG. All Rights Reserved.