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;
Specific AbstractBaseDelegate for com.google.api.ads.adwords.axis.v201306.ch.CustomerSyncServiceInterface.

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

Author(s):
Julian Toledo
  private static final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd hhmmss");

  
Default Constructor.

Parameters:
adWordsSession the adWordsSession to use with the delegate/service
  public CustomerSyncDelegate(AdWordsSession adWordsSession) {
    super(adWordsSessionCustomerSyncServiceInterface.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 CustomerSyncDelegate(AdWordsSession adWordsSessionCustomerSyncServiceInterface service) {
    super(adWordsSessionservice);
  }

  
Retrieves CampaignChangeDatas by campaignIds and dates.

Parameters:
campaignIds
dateStart the start Date
dateEnd the end Date
Returns:
a list of CampaignChangeDatas matching the campaignIds and dates
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<CampaignChangeDatagetCampaignChangeData(List<LongcampaignIdsDate dateStart,
      Date dateEndthrows RemoteException {
    DateTimeRange dateTimeRange = new DateTimeRange();
    dateTimeRange.setMin(.format(dateStart));
    dateTimeRange.setMax(.format(dateEnd));
    CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
    customerSyncSelector.setDateTimeRange(dateTimeRange);
    customerSyncSelector.setCampaignIds(Longs.toArray(campaignIds));
    return Arrays.asList(getService().get(customerSyncSelector).getChangedCampaigns());
  }

  
Retrieves CampaignChangeDatas by campaignId and dates.

Parameters:
campaignId
dateStart the start Date
dateEnd the end Date
Returns:
a list of CampaignChangeDatas matching the campaignId and dates
Throws:
java.rmi.RemoteException for communication-related exceptions
  public List<CampaignChangeDatagetCampaignChangeData(Long campaignIdDate dateStart,
      Date dateEndthrows RemoteException {
    return getCampaignChangeData(ImmutableList.of(campaignId), dateStartdateEnd);
  }
New to GrepCode? Check out our FAQ X