|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 .
queryRowList contains the rows that satisfy the query condition.
Sorting the rows in the row list according to some condition.
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);
sortedRowList contains the sorted rows.
//sort in SYNC_KEY field in ascending order
Condition sortOrder = queryFactory.createSortOrder(syncKeyFieldDescriptor,true);
RowList sortedRowList = rowList.sort(sortOrder);
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 |
public Row get(int index)
index
- an index into this RowList
public RowList getRowList(Query query)
query
- the query object which holds the condition/s
public void sort(SortOrder sortOrder)
sortOrder
- the SortOrder specifying the sort field and order. May
contain multiple SortOrder objects.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |