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.v201502.cm.AdGroup.

Author(s):
Julian Toledo
 
 public final class AdGroupDelegate extends
 
   // We use another delegate for the Labels, just for the mutateLabel operation.
   private final AdGroupLabelDelegate adGroupLabelDelegate;

  
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);
      = new AdGroupLabelDelegate(adWordsSessionthis.getService());
   }

  
Constructor with custom service.

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

  
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);
      = new AdGroupLabelDelegate(adWordsSessionthis.getService());
   }

  
Retrieves AdGroups by adIds.

Parameters:
adGroupId the Id of the AdGroup
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 the Ids of the Campaigns
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 the Id of the Campaign
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 the Id of the Campaign
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 the Status of the AdGroup
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 the Status of the AdGroup
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);
  }

  
Retrieves AdGroups by labelIds.

Parameters:
labelIds the Ids of the Labels to retreive the AdGroups
Returns:
a list of AdGroups matching labelIds
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdGroupgetByLabelIds(List<LonglabelIdsthrows RemoteException {
  }

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

Parameters:
list the list of AdGroups to remove
Returns:
the AdGroups removed
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 REMOVED and performs a Set.

Parameters:
adGroup the AdGroup to remove
Returns:
the AdGroup removed
Throws:
java.rmi.RemoteException for communication-related exceptions
  public AdGroup remove(AdGroup adGroupthrows RemoteException {
    return update(adGroup);
  }

  
Creates a link (AdGroupLabel) between AdGroups and Labels.

Parameters:
adGroupLabels the AdGroupLabels to add
Returns:
the AdGroupLabels added
Throws:
java.rmi.RemoteException for communication-related exceptions
      throws RemoteException {
    return .insert(adGroupLabels);
  }

  
Creates a link (AdGroupLabel) between AdGroups and Labels.

Parameters:
adGroupLabel the AdGroupLabel to add
Returns:
the AdGroupLabel added
Throws:
java.rmi.RemoteException for communication-related exceptions
  public AdGroupLabel insertAdGroupLabel(AdGroupLabel adGroupLabel)throws RemoteException {
    return .insert(adGroupLabel);
  }

  
Removes a link (AdGroupLabel) between AdGroups and Labels.

Parameters:
adGroupLabels the AdGroupLabels to remove
Returns:
the AdGroupLabels removed
Throws:
java.rmi.RemoteException for communication-related exceptions
      throws RemoteException {
    return .remove(adGroupLabels);
  }

  
Removes a link (AdGroupLabel) between AdGroups and Labels.

Parameters:
adGroupLabel the AdGroupLabel to remove
Returns:
the AdGroupLabel removed
Throws:
java.rmi.RemoteException for communication-related exceptions
  public AdGroupLabel removeAdGroupLabel(AdGroupLabel adGroupLabelthrows RemoteException {
    return .remove(adGroupLabel);
  }
New to GrepCode? Check out our FAQ X