code: public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
        throws RemoteException {
      // Get the LineItemCreativeAssociationService.
      LineItemCreativeAssociationServiceInterface licaService =
          adManagerServices.get(session, LineItemCreativeAssociationServiceInterface.class);
  
      // Create a statement to get all LICAs.
      StatementBuilder statementBuilder = new StatementBuilder()
          .orderBy("lineItemId ASC, creativeId ASC")
          .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT);
  
      // Default for total result set size.
      int totalResultSetSize = 0;
  
      do {
        // Get LICAs by statement.
        LineItemCreativeAssociationPage page =
            licaService.getLineItemCreativeAssociationsByStatement(statementBuilder.toStatement());
  
        if (page.getResults() != null) {
          totalResultSetSize = page.getTotalResultSetSize();
          int i = page.getStartIndex();
          for (LineItemCreativeAssociation lica : page.getResults()) {
            if (lica.getCreativeSetId() != null) {
              System.out.printf(
                  "%d) LICA with line item ID %d and creative set ID %d was found.%n", i++,
                  lica.getLineItemId(), lica.getCreativeSetId());
            } else {
              System.out.printf(
                  "%d) LICA with line item ID %d and creative ID %d was found.%n", i++,
                  lica.getLineItemId(), lica.getCreativeId());
            }
          }
        }
  
        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.