T - type of object that the Service works with, for example Campaign, AdGroup, etc.S - the service interface class. This is a class representing a SOAP service.
Implementation is not thread-safe, because AdWordsSession and Apache Axis service objects are not thread-safe.
public abstract class AbstractGetDelegate<T,S> extends AbstractBaseDelegate<S>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGetDelegate(AdWordsSession adWordsSession,
Class<T> classT,
Class<S> classS)
Constructor without fields, used in services that do not support Generic Selectors.
|
protected |
AbstractGetDelegate(AdWordsSession adWordsSession,
Class<T> classT,
Class<S> classS,
List<? extends SelectorFields.FieldType<T>> selectorFields)
Constructor with fields, used in services that support Generic Selectors.
|
protected |
AbstractGetDelegate(AdWordsSession adWordsSession,
Class<T> classT,
S service)
Constructor without fields, used in services that do not support Generic Selectors
and with custom service.
|
protected |
AbstractGetDelegate(AdWordsSession adWordsSession,
Class<T> classT,
S service,
List<? extends SelectorFields.FieldType<T>> selectorFields)
Constructor with fields, used in services that support Generic Selectors.
|
| Modifier and Type | Method and Description |
|---|---|
protected SelectorBuilder |
createSelectorBuilder()
Creates a Generic Selector Builder with all the fields declared in the subClass.
|
List<T> |
get()
Gets all
<T> objects using a Generic Selector without predicates. |
List<T> |
get(int startIndex,
int numberResults)
Gets all
<T> objects using a Generic Selector with Paging without predicates. |
List<T> |
get(com.google.api.ads.adwords.axis.v201506.cm.Selector selector)
Calls the appropriate Get method declared by the
ServiceInterface S.
|
protected List<T> |
getByField(SelectorFields.FieldType<T> selectorField,
List<Long> fieldValues)
Gets all the
<T> objects using a Generic Selector with a predicate for a list of
values. |
protected List<T> |
getByField(SelectorFields.FieldType<T> selectorField,
long fieldValue,
int startIndex,
int numberResults)
Gets all the
<T> objects using a Generic Selector with a single predicate for a list of
values using pagination. |
protected List<T> |
getByField(SelectorFields.FieldType<T> selectorField,
Object fieldValue)
Gets all the
<T> objects using a Generic Selector with a predicate for one field value. |
protected List<T> |
getByField(SelectorFields.FieldType<T> selectorField,
String fieldValue,
int startIndex,
int numberResults)
Gets all the
<T> objects using a Generic Selector with a predicate for a list of values
using pagination. |
protected List<T> |
getByFieldContainsAny(SelectorFields.FieldType<T> selectorField,
List<Long> fieldValues)
Gets all the
<T> objects using a Generic Selector with a containsAny predicate for a
list of values. |
Class<T> |
getClassT()
Returns the classT type.
|
protected T |
getOneByField(SelectorFields.FieldType<T> selectorField,
Object fieldValue)
Gets a single
<T> object using a Generic Selector with a predicate for one field value,
null if the object does not exist and an exception if there are more than one matches. |
protected Object |
getPage(com.google.api.ads.adwords.axis.v201506.cm.Selector selector)
Calls the appropriate Get method declared by the
ServiceInterface S.
|
protected void |
setGetMethodName(String getMethodName)
Returns the name of the "get" method defined in the AdWords Service.
|
getAdWordsSession, getServiceprotected AbstractGetDelegate(AdWordsSession adWordsSession, Class<T> classT, Class<S> classS)
Fields are not necessary for Services that do not use Generic Selectors.
adWordsSession - the adWordsSession to use with the serviceclassT - type of object that the Service works with, for example Campaign, AdGroup, etc.classS - the service interface class for the SOAP serviceprotected AbstractGetDelegate(AdWordsSession adWordsSession, Class<T> classT, S service)
Fields are not necessary for Services that do not use Generic Selectors.
adWordsSession - the adWordsSession to use with the serviceclassT - type of object that the Service works with, for example Campaign, AdGroup, etc.service - the custom service class for the SOAP serviceprotected AbstractGetDelegate(AdWordsSession adWordsSession, Class<T> classT, Class<S> classS, List<? extends SelectorFields.FieldType<T>> selectorFields)
adWordsSession - the adWordsSession to use with the serviceclassT - type of object that the Service works with, for example Campaign, AdGroup, etc.classS - the service interface class for the SOAP serviceselectorFields - for the Generic Selectors using the SelectorField classprotected AbstractGetDelegate(AdWordsSession adWordsSession, Class<T> classT, S service, List<? extends SelectorFields.FieldType<T>> selectorFields)
adWordsSession - the adWordsSession to use with the serviceclassT - type of object that the Service works with, for example Campaign, AdGroup, etc.service - the custom service class for the SOAP serviceselectorFields - for the Generic Selectors using the SelectorField classpublic Class<T> getClassT()
protected void setGetMethodName(String getMethodName)
getMethodName - the name of the "get" method defined in the AdWords Servicepublic List<T> get(com.google.api.ads.adwords.axis.v201506.cm.Selector selector) throws RemoteException
This method should be overridden by delegates for Services that do not support Generic Selectors.
selector - should be a Generic Selector
(com.google.api.adwords.v201506.cm.Selector) or a specific
Selector appropriate to the ServiceInterface used that does not
support Generic Selectors<T>RemoteException - for communication-related exceptionsprotected Object getPage(com.google.api.ads.adwords.axis.v201506.cm.Selector selector) throws RemoteException
selector - should be a Generic Selector
(com.google.api.adwords.v201506.cm.Selector) or a specific
Selector appropriate to the ServiceInterface used that does not
support Generic SelectorsRemoteException - for communication-related exceptionsprotected SelectorBuilder createSelectorBuilder()
public List<T> get() throws RemoteException
<T> objects using a Generic Selector without predicates.<T> objects for the ManagedCustomerRemoteException - for communication-related exceptionspublic List<T> get(int startIndex, int numberResults) throws RemoteException
<T> objects using a Generic Selector with Paging without predicates.startIndex - index of the first result to retrievenumberResults - total number of result to retrieve<T> objects for the ManagedCustomerRemoteException - for communication-related exceptionsprotected T getOneByField(SelectorFields.FieldType<T> selectorField, Object fieldValue) throws RemoteException
<T> object using a Generic Selector with a predicate for one field value,
null if the object does not exist and an exception if there are more than one matches.selectorField - name of the fieldfieldValue - value for the field in the predicate<T> object matching the fieldValueRemoteException - for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, Object fieldValue) throws RemoteException
<T> objects using a Generic Selector with a predicate for one field value.selectorField - name of the fieldfieldValue - value for the field in the predicate<T> objects matching the fieldValueRemoteException - for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, List<Long> fieldValues) throws RemoteException
<T> objects using a Generic Selector with a predicate for a list of
values.selectorField - name of the fieldfieldValues - list of values for the field in the predicate<T> objects matching the fieldValuesRemoteException - for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, long fieldValue, int startIndex, int numberResults) throws RemoteException
<T> objects using a Generic Selector with a single predicate for a list of
values using pagination.selectorField - name of the fieldfieldValue - list of values for the field in the predicatestartIndex - index of the first resultnumberResults - number of results<T> objects matching the fieldValues in the range (startIndex,
numberResults)RemoteException - for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, String fieldValue, int startIndex, int numberResults) throws RemoteException
<T> objects using a Generic Selector with a predicate for a list of values
using pagination.selectorField - name of the fieldfieldValue - list of values for the field in the predicatestartIndex - index of the first resultnumberResults - number of results<T> objects matching the fieldValues in the range (startIndex,
numberResults)RemoteException - for communication-related exceptionsprotected List<T> getByFieldContainsAny(SelectorFields.FieldType<T> selectorField, List<Long> fieldValues) throws RemoteException
<T> objects using a Generic Selector with a containsAny predicate for a
list of values.selectorField - name of the fieldfieldValues - list of values for the field in the predicate<T> objects matching the fieldValuesRemoteException - for communication-related exceptionsCopyright © 2016. All Rights Reserved.