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.v201306.cm.AdExtensionOverride.

Implementation is not thread-safe, because AdWordsSession and Apache Axis service objects are not thread-safe.

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

Parameters:
adWordsSession the adWordsSession to use with the delegate/service
 
   public AdExtensionOverrideDelegate(AdWordsSession adWordsSession) {
     // Fields are not necessary for Services that do not use Generic Selectors
     super(adWordsSessionAdExtensionOverride.classAdExtensionOverrideOperation.class,
         AdExtensionOverrideServiceInterface.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 AdExtensionOverrideDelegate(AdWordsSession adWordsSession,
       AdExtensionOverrideServiceInterface service) {
     // Fields are not necessary for Services that do not use Generic Selectors
     super(adWordsSessionAdExtensionOverride.classAdExtensionOverrideOperation.class,
         service);
   }

  
Retrieves all AdExtensionOverrides for the ManagedCustomer associate with the adWordsSession. Overrides AwAbstractGetDelegate method to change to specific (non-generic) selector.

Returns:
All the AdExtensionOverrides for the ManagedCustomer
Throws:
java.rmi.RemoteException for communication-related exceptions
 
   @Override
   public List<AdExtensionOverrideget() throws RemoteException {
     return get(new AdExtensionOverrideSelector());
   }

  
Retrieves all AdExtensionOverrides for the ManagedCustomer associate with the adWordsSession. Overrides AwAbstractGetDelegate method to change to specific (non-generic) selector.

Parameters:
selector the AdExtensionOverrideSelector for the service call
Returns:
All the AdExtensionOverrides for the ManagedCustomer
Throws:
java.rmi.RemoteException for communication-related exceptions
 
       throws RemoteException {
     return ListUtil.asList(getService().get(selector).getEntries());
   }

  
Retrieves AdExtensionOverrides by adIds.

Parameters:
adIds a list of Ad id
Returns:
a list of AdExtensionOverrides matching the adIds
Throws:
java.rmi.RemoteException for communication-related exceptions
 
   public List<AdExtensionOverridegetByAdId(List<LongadIdsthrows RemoteException {
    if (adIds != null) {
      selector.setAdIds(Longs.toArray(adIds));
    }
    return get(selector);
  }

  
Retrieves AdExtensionOverrides by adIds.

Parameters:
adId the Ad id
Returns:
a list of AdExtensionOverrides matching the adIds
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdExtensionOverridegetByCampaignIdAdId(Long campaignIdLong adId)
      throws RemoteException {
    if (adId != null) {
      selector.setAdIds(new long[]{adId});
    }
    if (campaignId != null) {
      selector.setCampaignIds(new long[]{campaignId});
    }
    return get(selector);
  }

  
Retrieves AdExtensionOverrides by adExtensionIds.

Parameters:
adExtensionIds
Returns:
a list of AdExtensionOverrides matching the adExtensionIds
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdExtensionOverridegetByAdExtensionId(List<LongadExtensionIds)
      throws RemoteException {
    if (adExtensionIds != null) {
      selector.setAdExtensionIds(Longs.toArray(adExtensionIds));
    }
    return get(selector);
  }

  
Retrieves AdExtensionOverrides by campaignIds.

Parameters:
campaignIds
Returns:
a list of AdExtensionOverrides matching the campaignIds
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdExtensionOverridegetByCampaignId(List<LongcampaignIdsthrows RemoteException {
    if (campaignIds != null) {
      selector.setCampaignIds(Longs.toArray(campaignIds));
    }
    return get(selector);
  }

  
Retrieves AdExtensionOverrides by campaignId.

Parameters:
campaignId
Returns:
a list of AdExtensionOverrides matching the campaignId
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<AdExtensionOverridegetByCampaignId(Long campaignIdthrows RemoteException {
    if (campaignId != null) {
      selector.setCampaignIds(new long[] { campaignId.longValue() });
    }
    return get(selector);
  }
New to GrepCode? Check out our FAQ X