this.tableName = tableName;
this.managementService = managementService;
}
public List<Item> loadItems(int start, int count) {
TablePageQuery query = managementService.createTablePageQuery().tableName(tableName);
if (sortPropertyIds != null && sortPropertyIds.length > 0) {
for (int i=0; i<sortPropertyIds.length; i++) {
String column = (String) sortPropertyIds[i]; // all container properties for table data are Strings
if (sortPropertyIdsAscending[i] == true) {
query.orderAsc(column);
} else {
query.orderDesc(column);
}
}
}
List<Map<String, Object>> rows = query.listPage(start, count).getRows();
List<Item> items = new ArrayList<Item>();
for (Map<String, Object> row : rows) {
HashMap<String, Object> newRow = new HashMap<String, Object>();
for( Entry<String,Object> rowEntry : row.entrySet() ) {