try
{
DatabaseQuery databaseQuery = queryResolver.buildQuery(filters, offset, length);
TableRowIterator rowIterator = DatabaseManager.queryTable(context.getContext(), "item",
databaseQuery.getQuery(), databaseQuery.getParameters().toArray());
ItemIterator iterator = new ItemIterator(context.getContext(), rowIterator);
int i = 0;
while (iterator.hasNext() && i < length)
{
org.dspace.content.Item it = iterator.next();
list.add(new DSpaceDatabaseItem(it, this.getMetadata(it), getSets(it)));
i++;
}
return new ListItemIdentifiersResult((databaseQuery.getTotal() > offset + length), list, databaseQuery.getTotal());
}