Reputation: 89
I have been working in guidewire application version 6.0.How would you paginate an extremely large dataset in the app-server?
Example : Consider entity payment. Currently the PCF is bring back all the payments preset in the claim to the screen and the no of result to display in the UI reduced to 3 by specifying pagesize=3. Now I would like to implement the same concept through pagination in the database, via a chunking query in order increase the system stability.
Upvotes: 0
Views: 420
Reputation: 904
if you mean pagination on UI @SebastianJ answer is correct, if you are tlaking about query level you need something like this:
var partitionSize = 1000
var rows = Query.make(InvoiceItem).select()
var rowPartitions = com.google.common.collect.Iterables.partition(rows,
partitionSize).iterator() //partitions invoice item ids
while(rowPartitions.hasNext()) {
var invoiceItems = rowPartitions.next().toTypedArray() //
...
}
Upvotes: 0
Reputation: 95
List views: have a build-in row iterator which should even allow you to specify the number of rows displayed on each page.
When you configure your row iterator, there's a parameter called "pageSize"
Upvotes: 0