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

Examples of com.google.api.ads.dfp.axis.v201302.ResultSet


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

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

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


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

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

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

*/
public class GetAllUsers {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the UserService.
    UserServiceInterface userService = dfpServices.get(session, UserServiceInterface.class);

    // Create a statement to get all users.
    StatementBuilder statementBuilder = new StatementBuilder()
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT);

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

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (User user : page.getResults()) {
View Full Code Here

  private static final String EMAIL_ADDRESS = "INSERT_EMAIL_ADDRESS_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session, String emailAddress)
      throws Exception {
    // Get the UserService.
    UserServiceInterface userService = dfpServices.get(session, UserServiceInterface.class);

    // Create a statement to select users by email address.
    StatementBuilder statementBuilder = new StatementBuilder()
        .where("email = :email")
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
        .withBindVariableValue("email", emailAddress);

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

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (User user : page.getResults()) {
View Full Code Here

*/
public class GetAllRoles {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the UserService.
    UserServiceInterface userService = dfpServices.get(session, UserServiceInterface.class);

    // Get all roles.
    Role[] roles = userService.getAllRoles();

    int i = 0;
    for (Role role : roles) {
      System.out.printf("%d) Role with ID \"%d\" and name \"%s\" was found.\n", i++, role.getId(),
          role.getName());
View Full Code Here

*/
public class GetCurrentUser {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the UserService.
    UserServiceInterface userService = dfpServices.get(session, UserServiceInterface.class);

    // Get the current user.
    User user = userService.getCurrentUser();

    System.out.printf(
        "User with ID \"%d\", name \"%s\", email \"%s\", and role \"%s\" is the current user.\n",
        user.getId(), user.getName(), user.getEmail(), user.getRoleName());
  }
View Full Code Here

    // Get the UserTeamAssociationService.
    UserTeamAssociationServiceInterface userTeamAssociationService =
        dfpServices.get(session, UserTeamAssociationServiceInterface.class);

    // Create a user team association.
    UserTeamAssociation userTeamAssociation = new UserTeamAssociation();
    userTeamAssociation.setUserId(userId);
    userTeamAssociation.setTeamId(teamId);

    // Create the user team association on the server.
    UserTeamAssociation[] userTeamAssociations =
        userTeamAssociationService.createUserTeamAssociations(
            new UserTeamAssociation[] {userTeamAssociation});
View Full Code Here

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

    do {
      // Get user team associations by statement.
      UserTeamAssociationPage page = userTeamAssociationService.getUserTeamAssociationsByStatement(
          statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (UserTeamAssociation userTeamAssociation : page.getResults()) {
          System.out.printf(
              "%d) User team association with user ID \"%d\" and team ID \"%d\" was found.\n", i++,
              userTeamAssociation.getUserId(), userTeamAssociation.getTeamId());
        }
      }
View Full Code Here

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

    do {
      // Get user team associations by statement.
      UserTeamAssociationPage page = userTeamAssociationService.getUserTeamAssociationsByStatement(
          statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (UserTeamAssociation userTeamAssociation : page.getResults()) {
          System.out.printf("%d) User team association with user ID \"%d\" and "
              + "team ID \"%d\" will be deleted.\n", i++, userTeamAssociation.getUserId(),
              userTeamAssociation.getTeamId());
        }
      }
View Full Code Here

  private static final String USER_ID = "INSERT_USER_ID_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session, long userId)
      throws Exception {
    // Get the UserTeamAssociationService.
    UserTeamAssociationServiceInterface userTeamAssociationService =
        dfpServices.get(session, UserTeamAssociationServiceInterface.class);

    // Create a statement to select all user team associations for a user.
    StatementBuilder statementBuilder = new StatementBuilder()
        .where("WHERE userId = :userId ")
        .orderBy("userId ASC, teamId ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
        .withBindVariableValue("userId", userId);

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

    do {
      // Get user team associations by statement.
      UserTeamAssociationPage page = userTeamAssociationService.getUserTeamAssociationsByStatement(
          statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.axis.v201302.ResultSet

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.