Package com.google.api.ads.dfp.lib.utils.v201211

Examples of com.google.api.ads.dfp.lib.utils.v201211.StatementBuilder


     
      // Create a statement to only select active third party slots.
      String statementText = "WHERE status = :status AND "
          + "companyId = :companyId LIMIT 500";
      Statement filterStatement =
          new StatementBuilder("")
            .putValue("status", ThirdPartySlotStatus.ACTIVE.toString())
            .putValue("companyId", companyId)
            .toStatement();

      // Set defaults for page and offset.
View Full Code Here


          user.getService(DfpService.V201211.THIRD_PARTY_SLOT_SERVICE);

      // Sets defaults for page and filterStatement.
      ThirdPartySlotPage page = new ThirdPartySlotPage();
      Statement filterStatement =
          new StatementBuilder("WHERE status = :status LIMIT 500 ").putValue("status",
              ThirdPartySlotStatus.ARCHIVED.toString()).toStatement();

      // Get third party slots by statement.
      page = thirdPartySlotService.getThirdPartySlotsByStatement(filterStatement);
View Full Code Here

          user.getService(DfpService.V201211.INVENTORY_SERVICE);

      // Create statement text to select active ad units.
      String statementText = "WHERE status = :status LIMIT 500";
      Statement filterStatement =
          new StatementBuilder("")
              .putValue("status", InventoryStatus.ACTIVE.toString())
              .toStatement();

      // Set defaults for page and offset.
      AdUnitPage page = new AdUnitPage();
View Full Code Here

      ThirdPartySlotServiceInterface thirdPartySlotService =
          user.getService(DfpService.V201211.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 =
          thirdPartySlotService.getThirdPartySlotsByStatement(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 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

      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();

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

          user.getService(DfpService.V201211.SUGGESTED_AD_UNIT_SERVICE);

      // Create statement to select all suggested ad units with 50 or more
      // requests.
      Statement filterStatement =
          new StatementBuilder("WHERE numRequests >= :numRequests").putValue("numRequests", 50L)
              .toStatement();

      // Get suggested ad units by statement.
      SuggestedAdUnitPage page =
          suggestedAdUnitService.getSuggestedAdUnitsByStatement(filterStatement);
View Full Code Here

      // Create a statement to only select line items from the specified order
      // that are in the approved (needs creatives) state.
      String statementText = "WHERE orderID = :orderId and status = :status LIMIT 500";
      Statement filterStatement =
          new StatementBuilder("")
              .putValue("orderId", orderId)
              .putValue("status", ComputedStatus.NEEDS_CREATIVES.toString())
              .toStatement();

      // Set defaults for page and offset.
View Full Code Here

      Date threeDaysAgo = now.getTime();

      // Create statement to only select line items for the given order that
      // have been modified in the last 3 days.
      Statement filterStatement =
          new StatementBuilder(
              "WHERE lastModifiedDateTime >= :dateTimeString AND orderId = :orderId LIMIT 500")
              .putValue("orderId", orderId)
              .putValue("dateTimeString", DATE_TIME_FORMAT.format(threeDaysAgo)).toStatement();

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

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

      // Set defaults for page and offset.
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.lib.utils.v201211.StatementBuilder

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.