Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  // Copyright 2012 Google Inc. All Rights Reserved.
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //       http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
 package com.google.api.ads.adwords.axis.utility.extension.delegates;
 
 
 import java.util.List;

Specific AbstractGetMutateDelegate for com.google.api.ads.adwords.axis.v201309.cm.AdGroup.

Author(s):
Julian Toledo
 
 public final class AdGroupDelegate extends
Default Constructor.

Parameters:
adWordsSession the adWordsSession to use with the delegate/service
 
   public AdGroupDelegate(AdWordsSession adWordsSession) {
     super(adWordsSession, SelectorFields.AdGroup.all(), AdGroup.classAdGroupOperation.class,
         AdGroupServiceInterface.class);
   }

  
Constructor with custom service.

Parameters:
adWordsSession the adWordsSession to use with the delegate/service
service the custom service class for the SOAP service
 
   public AdGroupDelegate(AdWordsSession adWordsSessionAdGroupServiceInterface service) {
     super(adWordsSession, SelectorFields.AdGroup.all(),
         AdGroup.classAdGroupOperation.classservice);
   }

  
Constructor with custom fields.

Parameters:
adWordsSession the adWordsSession to use with the delegate/service
selectorFields for the Generic Selectors using the SelectorField class
 
   public AdGroupDelegate(AdWordsSession adWordsSession,
       List<SelectorFields.AdGroupselectorFields) {
     super(adWordsSessionselectorFieldsAdGroup.classAdGroupOperation.class,
         AdGroupServiceInterface.class);
   }

  
Retrieves AdGroups by adIds.

Parameters:
adGroupId
Returns:
a list of AdGroups matching the adGroupId
Throws:
java.rmi.RemoteException for communication-related exceptions
 
   public AdGroup getByAdGroupId(Long adGroupIdthrows RemoteException {
     return getOneByField(..adGroupId);
   }

  
Retrieves AdGroups by campaignIds.

Parameters:
campaignIds
Returns:
a list of AdGroups matching the campaignIds
Throws:
java.rmi.RemoteException for communication-related exceptions
 
   public List<AdGroupgetByCampaignId(List<LongcampaignIdsthrows RemoteException {
     return getByField(..campaignIds);
   }

  
Retrieves AdGroups by campaignId.

Parameters:
campaignId
Returns:
a list of AdGroups matching the campaignId
Throws:
java.rmi.RemoteException for communication-related exceptions
 
   public List<AdGroupgetByCampaignId(Long campaignIdthrows RemoteException {
     return getByField(..campaignId);
   }

  
Retrieves AdGroups by campaignId in the range (startIndex, numberResults).

Parameters:
campaignId
startIndex index of the first result
numberResults number of results
Returns:
a list of AdGroups matching the campaignId in the range (startIndex, numberResults)
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdGroupgetByCampaignId(Long campaignIdint startIndexint numberResults)
      throws RemoteException {
    return getByField(..campaignIdstartIndexnumberResults);
  }

  
Retrieves AdGroups by adGroupStatus.

Parameters:
adGroupStatus
Returns:
a list of AdGroups matching the campaignId
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdGroupgetByStatus(AdGroupStatus adGroupStatusthrows RemoteException {
    return getByField(..adGroupStatus);
  }

  
Retrieves AdGroups by adGroupStatus in the range (startIndex, numberResults).

Parameters:
adGroupStatus
startIndex index of the first result
numberResults number of results
Returns:
a list of AdGroups matching the campaignId in the range (startIndex, numberResults)
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdGroupgetByStatus(AdGroupStatus adGroupStatusint startIndexint numberResults)
      throws RemoteException {
        adGroupStatus.getValue(), startIndexnumberResults);
  }

  
Removes AdGroups. Removing it sets the ad groups' statuses to DELETED and performs a Set.

Parameters:
list the list of AdGroups to remove
Returns:
the AdGroups deleted
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdGroupremove(List<AdGrouplistthrows RemoteException {
    for (AdGroup adGroup : list) {
      adGroup.setStatus(.);
    }
    return update(list);
  }

  
Removes AdGroup. Removing it sets the ad group's status to DELETED and performs a Set.

Parameters:
adGroup the AdGroup to remove
Returns:
the AdGroup deleted
Throws:
java.rmi.RemoteException for communication-related exceptions
  public AdGroup remove(AdGroup adGroupthrows RemoteException {
    return update(adGroup);
  }
New to GrepCode? Check out our FAQ X