/** * Create an instance of {@link ManagedCustomerPage } * */ public ManagedCustomerPage createManagedCustomerPage() { return new ManagedCustomerPage(); }
/** * Add client customer IDs into the result set. * * @param managedCustomerPage the page of managed customers * @param clientCustomerIdsSet the result set of client customer IDs */ private static void addClientCustomerIds( @Nullable ManagedCustomerPage managedCustomerPage, Set<Long> clientCustomerIdsSet) { if (managedCustomerPage != null) { List<ManagedCustomer> managedCustomers = managedCustomerPage.getEntries(); // ManagedCustomerPage.getEntries() could return null. if (managedCustomers != null) { for (ManagedCustomer managedCustomer : managedCustomers) { clientCustomerIdsSet.add(managedCustomer.getCustomerId()); } } } } }
offset += NUMBER_OF_RESULTS; selector = builder.increaseOffsetBy(NUMBER_OF_RESULTS).build(); } while (managedCustomerPage.getTotalNumEntries() > offset);