Examples of query()


Examples of com.google.api.adwords.v201306.cm.AdGroupCriterionServiceInterface.query()

      String query = String.format(
          "SELECT Id, AdGroupId, Status WHERE AdGroupId = %d AND Status = ACTIVE ORDER BY Id ",
          adGroupId);

      // Get all active ad group criteria.
      AdGroupCriterionPage page = adGroupCriterionService.query(query);

      // Display ad group criteria.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
          if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
View Full Code Here

Examples of com.google.api.adwords.v201306.cm.CampaignServiceInterface.query()

      CampaignServiceInterface campaignService =
          user.getService(AdWordsService.V201306.CAMPAIGN_SERVICE);

      String query = "SELECT Id, Name, Status ORDER BY Name";
      // Get all campaigns.
      CampaignPage page = campaignService.query(query);

      // Display campaigns.
      if (page.getEntries() != null) {
        for (Campaign campaign : page.getEntries()) {
          System.out.println("Campaign with name \"" + campaign.getName() + "\" and id \""
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.AdGroupCriterionServiceInterface.query()

      String query = String.format(
          "SELECT Id, AdGroupId, Status WHERE AdGroupId = %d AND Status = ACTIVE ORDER BY Id ",
          adGroupId);

      // Get all active ad group criteria.
      AdGroupCriterionPage page = adGroupCriterionService.query(query);

      // Display ad group criteria.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
          if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.CampaignServiceInterface.query()

      CampaignServiceInterface campaignService =
          user.getService(AdWordsService.V201309.CAMPAIGN_SERVICE);

      String query = "SELECT Id, Name, Status ORDER BY Name";
      // Get all campaigns.
      CampaignPage page = campaignService.query(query);

      // Display campaigns.
      if (page.getEntries() != null) {
        for (Campaign campaign : page.getEntries()) {
          System.out.println("Campaign with name \"" + campaign.getName() + "\" and id \""
View Full Code Here

Examples of com.google.gdata.client.appsforyourdomain.UserService.query()

    query.setStartUsername(null);
    allUsers = new UserFeed();
    UserFeed currentPage;
    Link nextLink;
    do {
      currentPage = userService.query(query, UserFeed.class);
      allUsers.getEntries().addAll(currentPage.getEntries());
      nextLink = currentPage.getLink(Link.Rel.NEXT, Link.Type.ATOM);
      if (nextLink != null) {
        retrieveUrl = new URL(nextLink.getHref());
      }
View Full Code Here

Examples of com.google.gdata.client.calendar.CalendarService.query()

      URL calUrl = new URL ( CALENDAR_FEED_URL );

      // Get Number of calendars 
      Query calQuery = new Query(calUrl);
      calQuery.setMaxResults(1);    
      CalendarFeed calFeed = calService.query(calQuery, CalendarFeed.class);
      if (calFeed.getTotalResults() == 0) {
        System.out.println("No Calendars");
      } else {
        // Set Number of calendars for query
        calQuery.setMaxResults(calFeed.getTotalResults());
View Full Code Here

Examples of com.google.gdata.client.contacts.ContactsService.query()

        }
        try {
            URL feedUrl = new URL("http://www.google.com/m8/feeds/contacts/" + email + "/full");
            Query query = new Query(feedUrl);
            query.setMaxResults(Integer.MAX_VALUE);
            ContactFeed resultFeed = service.query(query, ContactFeed.class);
            List<Contact> contacts = new ArrayList<Contact>();
            for (ContactEntry entry : resultFeed.getEntries()) {
                for (Email email : entry.getEmailAddresses()) {
                    String address = email.getAddress();
                    String name = null;
View Full Code Here

Examples of com.google.gdata.client.youtube.YouTubeService.query()

            int i = 1;
            while (true) {
                YouTubeQuery query = new YouTubeQuery(url);
                query.setMaxResults(MAX_RESULTS);
                query.setStartIndex(i);
                FriendFeed feed = serv.query(query, FriendFeed.class);
                for (FriendEntry entry : feed.getEntries()) {
                    friends.add(entry.getUsername());
                }
                i += MAX_RESULTS;
                if (i > feed.getTotalResults()) {
View Full Code Here

Examples of com.google.gerrit.server.query.change.ListChanges.query()

        buf.write(JSON_MAGIC);
      }

      Writer out = new BufferedWriter(new OutputStreamWriter(buf, "UTF-8"));
      try {
        impl.query(out);
      } catch (QueryParseException e) {
        res.setStatus(HttpServletResponse.SC_BAD_REQUEST);
        sendText(req, res, e.getMessage());
        return;
      } catch (OrmException e) {
View Full Code Here

Examples of com.google.gerrit.server.query.change.QueryProcessor.query()

    p.setIncludeComments(get(req, "comments", false));
    p.setIncludeCurrentPatchSet(get(req, "current-patch-set", false));
    p.setIncludePatchSets(get(req, "patch-sets", false));
    p.setIncludeApprovals(get(req, "all-approvals", false));
    p.setOutput(rsp.getOutputStream(), format);
    p.query(get(req, "q", "status:open"));
  }

  private static void error(HttpServletResponse rsp, String message)
      throws IOException {
    ErrorMessage em = new ErrorMessage();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.