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

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


      // Create statement text to select the active creative wrappers for the
      // given label.
      String statementText =
          "WHERE status = :status AND labelId = :labelId LIMIT 500";
      Statement filterStatement =
          new StatementBuilder(statementText)
              .putValue("status", CreativeWrapperStatus.ACTIVE.toString())
              .putValue("labelId", labelId)
              .toStatement();

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


      // Get InventoryService.
      InventoryServiceInterface inventoryService =
          user.getService(DfpService.V201211.INVENTORY_SERVICE);

      // Create statement object to only select web ad unit sizes.
      Statement filterStatement = new StatementBuilder("WHERE targetPlatform = :targetPlatform")
          .putValue("targetPlatform", TargetPlatform.WEB.toString()).toStatement();

      // Get all ad unit sizes.
      AdUnitSize[] adUnitSizes = inventoryService.getAdUnitSizesByStatement(filterStatement);
View Full Code Here

          user.getService(DfpService.V201211.CREATIVE_WRAPPER_SERVICE);

      // Create a statement to select only active creative wrappers.
      String statementText = "WHERE status = :status LIMIT 500";
      Statement filterStatement =
          new StatementBuilder(statementText)
              .putValue("status", CreativeWrapperStatus.ACTIVE.toString()).toStatement();

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

      // Get the CustomTargetingService.
      CustomTargetingServiceInterface customTargetingService =
          user.getService(DfpService.V201211.CUSTOM_TARGETING_SERVICE);

      // Create a statement to only select predefined custom targeting keys.
      Statement filterStatement = new StatementBuilder("WHERE type = :type LIMIT 500").putValue(
          "type", CustomTargetingKeyType.PREDEFINED.toString()).toStatement();

      // Get custom targeting keys by statement.
      CustomTargetingKeyPage page =
          customTargetingService.getCustomTargetingKeysByStatement(filterStatement);
View Full Code Here

      Long masterCreativeId = Long.parseLong("INSERT_MASTER_CREATIVE_ID_HERE");

      // Create statement object to only select creative sets that have the
      // given master creative.
      Statement filterStatement =
          new StatementBuilder("WHERE masterCreativeId = :masterCreativeId LIMIT 500")
              .putValue("masterCreativeId", masterCreativeId).toStatement();

      // Get creative sets by statement.
      CreativeSetPage page = creativeSetService.getCreativeSetsByStatement(filterStatement);
View Full Code Here

          user.getService(DfpService.V201211.SUGGESTED_AD_UNIT_SERVICE);

      // Create a statement to only select suggested ad units that have more
      // than 50 requests.
      Statement filterStatement =
          new StatementBuilder("WHERE numRequests > :numRequests LIMIT 500")
              .putValue("numRequests", 50).toStatement();

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

      Long userId = Long.parseLong("INSERT_USER_ID_HERE");

      // Create filter text to select user team associations by the user ID.
      String statementText = "WHERE userId = :userId LIMIT 500";
      Statement filterStatement =
        new StatementBuilder("")
            .putValue("userId", userId)
            .toStatement();

      // Get user team associations by statement.
      UserTeamAssociationPage page =
View Full Code Here

      long currentUserId = userService.getCurrentUser().getId();

      // Create filter text to select user team associations by the user ID.
      String statementText = "WHERE userId = :userId LIMIT 500";
      Statement filterStatement =
        new StatementBuilder("")
            .putValue("userId", currentUserId)
            .toStatement();

      // Get user team associations by statement.
      UserTeamAssociationPage page =
View Full Code Here

      // Get the effective root ad unit ID of the network.
      String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

      // Create a statement to select the children of the effective root ad
      // unit.
      Statement filterStatement = new StatementBuilder("WHERE parentId = :id LIMIT 500")
          .putValue("id", effectiveRootAdUnitId).toStatement();

      // Get ad units by statement.
      AdUnitPage page = inventoryService.getAdUnitsByStatement(filterStatement);
View Full Code Here

      Long userId = Long.parseLong("INSERT_USER_ID_HERE");

      // Create filter text to select user team associations by the user ID.
      String statementText = "WHERE userId = :userId LIMIT 500";
      Statement filterStatement =
        new StatementBuilder("")
            .putValue("userId", userId)
            .toStatement();

      // Set defaults for page and offset.
      UserTeamAssociationPage page = new UserTeamAssociationPage();
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.