Add next page navigation for RDAP entity searches

A couple methods were moved to new locations so they are accessible to all types of search queries, not just nameservers like they originally were.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179089014
This commit is contained in:
mountford 2017-12-14 13:40:02 -08:00 committed by Ben McIlwain
parent c8059d4d8a
commit e619ea1bff
12 changed files with 398 additions and 111 deletions

View file

@ -419,6 +419,7 @@ public abstract class RdapActionBase implements Runnable {
static <T extends EppResource> Query<T> queryItemsByKey(
Class<T> clazz,
RdapSearchPattern partialStringQuery,
Optional<String> cursorString,
DeletedItemHandling deletedItemHandling,
int resultSetMaxSize) {
if (partialStringQuery.getInitialString().length()
@ -437,6 +438,9 @@ public abstract class RdapActionBase implements Runnable {
.filterKey(">=", Key.create(clazz, partialStringQuery.getInitialString()))
.filterKey("<", Key.create(clazz, partialStringQuery.getNextInitialString()));
}
if (cursorString.isPresent()) {
query = query.filterKey(">", Key.create(clazz, cursorString.get()));
}
return setOtherQueryAttributes(query, deletedItemHandling, resultSetMaxSize);
}