Package com.google.api.ads.dfp.v201302

Examples of com.google.api.ads.dfp.v201302.Statement


      // Get the ThirdPartySlotService.
      ThirdPartySlotServiceInterface thirdPartySlotService =
          user.getService(DfpService.V201302.THIRD_PARTY_SLOT_SERVICE);

      // Create a statement to get one active third party slot.
      Statement filterStatement =
          new StatementBuilder("WHERE status = :status LIMIT 1")
              .putValue("status", ThirdPartySlotStatus.ACTIVE.toString()).toStatement();

      // Get third party slot by statement.
      ThirdPartySlotPage page =
View Full Code Here


      // Set the ID of the order to get line items from.
      Long orderId = Long.parseLong("INSERT_ORDER_ID_HERE");

      // Create a statement to get line items with even delivery rates.
      Statement filterStatement = new StatementBuilder(
          "WHERE deliveryRateType = :deliveryRateType AND orderId = :orderId LIMIT 500")
              .putValue("orderId", orderId)
              .putValue("deliveryRateType", DeliveryRateType.EVENLY.toString()).toStatement();

      // Get line items by statement.
View Full Code Here

          user.getService(DfpService.V201302.CUSTOM_FIELD_SERVICE);

      // Create statement to select only custom fields that apply to line items.
      String statementText =
          "WHERE entityType = :entityType LIMIT 500";
      Statement filterStatement =
          new StatementBuilder(statementText)
              .putValue("entityType", CustomFieldEntityType.LINE_ITEM.toString())
              .toStatement();

      // Set defaults for page and offset.
      CustomFieldPage page = new CustomFieldPage();
      int offset = 0;
      int i = 0;
      List<Long> customFieldIds = new ArrayList<Long>();

      do {
        // Create a statement to page through custom fields.
        filterStatement.setQuery(statementText + " OFFSET " + offset);

        // Get custom fields by statement.
        page = customFieldService.getCustomFieldsByStatement(filterStatement);

        if (page.getResults() != null) {
View Full Code Here

      // Get the ContactService.
      ContactServiceInterface contactService =
          user.getService(DfpService.V201302.CONTACT_SERVICE);

      // Create a statement to only select contacts that aren't invited yet.
      Statement filterStatement =
          new StatementBuilder("WHERE status = :status LIMIT 500")
              .putValue("status", ContactStatus.UNINVITED.toString()).toStatement();

      // Get contacts by statement.
      ContactPage page = contactService.getContactsByStatement(filterStatement);
View Full Code Here

      // Set the ID of the order to get line items from.
      Long orderId = Long.parseLong("INSERT_ORDER_ID_HERE");

      // Create a statement to only select line items that need creatives from a
      // given order.
      Statement filterStatement =
          new StatementBuilder("WHERE orderId = :orderId AND status = :status LIMIT 500")
              .putValue("orderId", orderId)
              .putValue("status", ComputedStatus.NEEDS_CREATIVES.toString())
              .toStatement();
View Full Code Here

    ActivityGroupServiceInterface activityGroupService =
        user.getService(DfpService.V201302.ACTIVITY_GROUP_SERVICE);

    // Set defaults for page and filterStatement.
    ActivityGroupPage page = new ActivityGroupPage();
    Statement filterStatement = new Statement();
    int offset = 0;

    do {
      // Create a statement to get all activity groups.
      filterStatement.setQuery("LIMIT 500 OFFSET " + offset);

      // Get activity groups by statement.
      page = activityGroupService.getActivityGroupsByStatement(filterStatement);

      if (page.getResults() != null) {
View Full Code Here

      // Set the ID of the activity group to get the activities for.
      Integer activityGroupId = Integer.parseInt("INSERT_ACTIVITY_GROUP_ID_HERE");

      // Create a statement to only select active activities.
      Statement filterStatement =
          new StatementBuilder(
              "WHERE activityGroupId = :activityGroupId and status = :status LIMIT 500")
              .putValue("activityGroupId", activityGroupId)
              .putValue("status", ActivityStatus.ACTIVE.toString()).toStatement();
View Full Code Here

      UserServiceInterface userService =
          user.getService(DfpService.V201302.USER_SERVICE);

      // Sets defaults for page and filterStatement.
      UserPage page = new UserPage();
      Statement filterStatement = new Statement();
      int offset = 0;

      do {
        // Create a statement to get all users.
        filterStatement.setQuery("LIMIT 500 OFFSET " + offset);

        // Get users by statement.
        page = userService.getUsersByStatement(filterStatement);

        if (page.getResults() != null) {
View Full Code Here

      AudienceSegmentServiceInterface audienceSegmentService =
          user.getService(DfpService.V201302.AUDIENCE_SEGMENT_SERVICE);

      // Set defaults for page and filterStatement.
      AudienceSegmentPage page;
      Statement filterStatement = new Statement();
      int offset = 0;

      do {
        // Create a statement to get all audience segments.
        filterStatement.setQuery("LIMIT 500 OFFSET " + offset);

        // Get audience segments by statement.
        page = audienceSegmentService.getAudienceSegmentsByStatement(filterStatement);

        if (page.getResults() != null) {
View Full Code Here

      // Get UserService.
      UserServiceInterface userService =
          user.getService(DfpService.V201302.USER_SERVICE);

      // Create a statement to get all users.
      Statement filterStatement = new Statement("LIMIT 500", null);

      // Get users by statement.
      UserPage page = userService.getUsersByStatement(filterStatement);

      if (page.getResults() != null) {
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201302.Statement

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.