code: public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
        throws RemoteException {
      CreativeServiceInterface creativeService =
          adManagerServices.get(session, CreativeServiceInterface.class);
  
      // Create a statement to select creatives.
      StatementBuilder statementBuilder =
          new StatementBuilder()
              .where("creativeType = :creativeType")
              .orderBy("id ASC")
              .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
              .withBindVariableValue("creativeType", "ImageCreative");
  
      // Retrieve a small amount of creatives at a time, paging through
      // until all creatives have been retrieved.
      int totalResultSetSize = 0;
      do {
        CreativePage page = creativeService.getCreativesByStatement(statementBuilder.toStatement());
  
        if (page.getResults() != null) {
          // Print out some information for each creative.
          totalResultSetSize = page.getTotalResultSetSize();
          int i = page.getStartIndex();
          for (Creative creative : page.getResults()) {
            System.out.printf(
                "%d) Creative with ID %d and name '%s' was found.%n",
                i++, creative.getId(), creative.getName());
          }
        }
  
        statementBuilder.increaseOffsetBy(StatementBuilder.SUGGESTED_PAGE_LIMIT);
      } while (statementBuilder.getOffset() < totalResultSetSize);
  
      System.out.printf("Number of results found: %d%n", totalResultSetSize);
    }
docs: Runs the example.
  
  @param adManagerServices 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.