| Michael Hanl | 1ea0045 | 2015-06-25 19:33:05 +0200 | [diff] [blame] | 1 | package de.ids_mannheim.korap.config; |
| 2 | |
| Michael Hanl | cafa03e | 2015-06-26 17:01:16 +0200 | [diff] [blame] | 3 | import de.ids_mannheim.korap.query.serialize.MetaQueryBuilder; |
| 4 | |
| Michael Hanl | 1ea0045 | 2015-06-25 19:33:05 +0200 | [diff] [blame] | 5 | /** |
| 6 | * @author hanl |
| 7 | * @date 25/06/2015 |
| 8 | */ |
| 9 | public class QueryBuilderUtil { |
| Michael Hanl | cafa03e | 2015-06-26 17:01:16 +0200 | [diff] [blame] | 10 | |
| Michael Hanl | 8abaf9e | 2016-05-23 16:46:35 +0200 | [diff] [blame] | 11 | public static MetaQueryBuilder defaultMetaBuilder (Integer pageIndex, |
| 12 | Integer pageInteger, Integer pageLength, String ctx, Boolean cutoff) { |
| Michael Hanl | cafa03e | 2015-06-26 17:01:16 +0200 | [diff] [blame] | 13 | MetaQueryBuilder meta = new MetaQueryBuilder(); |
| 14 | meta.addEntry("startIndex", pageIndex) |
| 15 | .addEntry("startPage", pageInteger) |
| 16 | .addEntry("count", pageLength).setSpanContext(ctx) |
| 17 | .addEntry("cutOff", cutoff); |
| 18 | return meta; |
| 19 | |
| 20 | } |
| Michael Hanl | 1ea0045 | 2015-06-25 19:33:05 +0200 | [diff] [blame] | 21 | } |