Package com.google.api.ads.dfp.v201306

Examples of com.google.api.ads.dfp.v201306.ActivityPage


    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (Activity activity : page.getResults()) {
          System.out.printf(
              "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n", i++,
              activity.getId(), activity.getName(), activity.getType());
        }
      }
View Full Code Here


      int totalResultSetSize = 0;
      statementBuilder.offset(0);

      do {
        // Get activities by statement.
        ActivityPage page =
            activityService.getActivitiesByStatement(statementBuilder.toStatement());

        if (page.getResults() != null) {
          totalResultSetSize = page.getTotalResultSetSize();
          for (Activity activity : page.getResults()) {
            System.out.printf(
                "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
                totalResultsCounter++, activity.getId(), activity.getName(), activity.getType());
          }
        }
View Full Code Here

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (Activity activity : page.getResults()) {
          System.out.printf(
              "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n", i++,
              activity.getId(), activity.getName(), activity.getType());
        }
      }
View Full Code Here

      int totalResultSetSize = 0;
      statementBuilder.offset(0);

      do {
        // Get activities by statement.
        ActivityPage page =
            activityService.getActivitiesByStatement(statementBuilder.toStatement());

        if (page.getResults() != null) {
          totalResultSetSize = page.getTotalResultSetSize();
          for (Activity activity : page.getResults()) {
            System.out.printf(
                "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
                totalResultsCounter++, activity.getId(), activity.getName(), activity.getType());
          }
        }
View Full Code Here

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (Activity activity : page.getResults()) {
          System.out.printf(
              "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n", i++,
              activity.getId(), activity.getName(), activity.getType());
        }
      }
View Full Code Here

      int totalResultSetSize = 0;
      statementBuilder.offset(0);

      do {
        // Get activities by statement.
        ActivityPage page =
            activityService.getActivitiesByStatement(statementBuilder.toStatement());

        if (page.getResults() != null) {
          totalResultSetSize = page.getTotalResultSetSize();
          for (Activity activity : page.getResults()) {
            System.out.printf(
                "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
                totalResultsCounter++, activity.getId(), activity.getName(), activity.getType());
          }
        }
View Full Code Here

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (Activity activity : page.getResults()) {
          System.out.printf(
              "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n", i++,
              activity.getId(), activity.getName(), activity.getType());
        }
      }
View Full Code Here

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get activities by statement.
      ActivityPage page =
          activityService.getActivitiesByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (Activity activity : page.getResults()) {
          System.out.printf(
              "%d) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
              i++, activity.getId(), activity.getName(), activity.getType());
        }
      }
View Full Code Here

      int totalResultsCounter = 0;

      for (Integer activityGroupId : activityGroupIds) {
        // Set defaults for page.
        ActivityPage page = new ActivityPage();
        int offset = 0;

        // Default for total result set size and offset.
        int totalResultSetSize = 0;

        // Set the activity group ID to select from.
        statementBuilder.putValue("activityGroupId", activityGroupId);

        do {
          // Create a statement to get all activities from an activity group.
          statementBuilder.setQuery(filterStatementString + offset);

          // Get activities by statement.
          page = activityService.getActivitiesByStatement(statementBuilder.toStatement());

          if (page.getResults() != null) {
            totalResultSetSize = page.getTotalResultSetSize();
            for (Activity activity : page.getResults()) {
              System.out.printf(
                  "%s) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n",
                  totalResultsCounter++, activity.getId(), activity.getName(), activity.getType());
            }
          }

          offset += 500;
        } while (offset < page.getTotalResultSetSize());
      }

      System.out.printf("Number of results found: %s\n", totalResultsCounter);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

              "WHERE activityGroupId = :activityGroupId and status = :status LIMIT 500")
              .putValue("activityGroupId", activityGroupId)
              .putValue("status", ActivityStatus.ACTIVE.toString()).toStatement();

      // Get activities by statement.
      ActivityPage page = activityService.getActivitiesByStatement(filterStatement);

      if (page.getResults() != null) {
        int i = page.getStartIndex();
        for (Activity activity : page.getResults()) {
          System.out.printf(
              "%s) Activity with ID \"%d\", name \"%s\", and type \"%s\" was found.\n", i++,
              activity.getId(), activity.getName(), activity.getType());
        }
      }

      System.out.println("Number of results found: " + page.getTotalResultSetSize());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201306.ActivityPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.