I am new to this API and I have been asked to migrate to the latest 
version. This includes updating a bunch of existing code that uses the old 
Selectors that are being sunsetted. I am considering using the below 
approach to minimize the impact of the change. My proposed approach 
introduces several new subclasses to Selector that replace the classes that 
are going away. Here is my main question/concern: Will subclassing Selector 
interfere with the serialization/deserialization process that the Selector 
undergoes?


public class CampaignSelector extends Selector {
  public CampaignSelector() {
    super();
    this.setFields(new 
String[]{"id","name","status","startDate","endDate"});
  }

  public void setCampaignStatuses(CampaignStatus[] campaignStatus) {
    List<Predicate> predicates = new 
ArrayList<Predicate>(Arrays.asList(getPredicates()));
    Predicate newPredicate = new Predicate("status", PredicateOperator.IN, 
StringUtils.toStringArray(campaignStatus));
    predicates.add(newPredicate);
    setPredicates((Predicate[]) predicates.toArray());
  }
}


-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to