code: public static void runExample(
        AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException {
      // Get the CampaignService.
      CampaignServiceInterface campaignService =
          adWordsServices.get(session, CampaignServiceInterface.class);
  
      int offset = 0;
  
      // Create selector.
      SelectorBuilder builder = new SelectorBuilder();
      Selector selector = builder
          .fields(CampaignField.Id, CampaignField.Name)
          .orderAscBy(CampaignField.Name)
          .offset(offset)
          .limit(PAGE_SIZE)
          .build();
  
      CampaignPage page;
      do {
        // Get all campaigns.
        page = campaignService.get(selector);
  
        // Display campaigns.
        if (page.getEntries() != null) {
          for (Campaign campaign : page.getEntries()) {
            System.out.printf("Campaign with name '%s' and ID %d was found.%n", campaign.getName(),
                campaign.getId());
          }
        } else {
          System.out.println("No campaigns were found.");
        }
  
        offset += PAGE_SIZE;
        selector = builder.increaseOffsetBy(PAGE_SIZE).build();
      } while (offset < page.getTotalNumEntries());
    }
docs: Runs the example.
  
  @param adWordsServices the services factory.
  @param session the session.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.