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
|
List<T> |
get(int startIndex,
int numberResults)
Gets all
|
List<T> |
get(com.google.api.ads.adwords.axis.v201409.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
|
protected List<T> |
getByField(SelectorFields.FieldType<T> selectorField,
long fieldValue,
int startIndex,
int numberResults)
Gets all the
|
protected List<T> |
getByField(SelectorFields.FieldType<T> selectorField,
Object fieldValue)
Gets all the
|
protected List<T> |
getByField(SelectorFields.FieldType<T> selectorField,
String fieldValue,
int startIndex,
int numberResults)
Gets all the
|
protected List<T> |
getByFieldContainsAny(SelectorFields.FieldType<T> selectorField,
List<Long> fieldValues)
Gets all the
|
Class<T> |
getClassT()
Returns the classT type.
|
protected T |
getOneByField(SelectorFields.FieldType<T> selectorField,
Object fieldValue)
Gets a single
|
protected Object |
getPage(com.google.api.ads.adwords.axis.v201409.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, getService
protected 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.v201409.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.v201409.cm.Selector) or a specific
Selector appropriate to the ServiceInterface used that does not
support Generic SelectorsRemoteException
- for communication-related exceptionsprotected Object getPage(com.google.api.ads.adwords.axis.v201409.cm.Selector selector) throws RemoteException
selector
- should be a Generic Selector
(com.google.api.adwords.v201409.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
RemoteException
- for communication-related exceptionspublic List<T> get(int startIndex, int numberResults) throws RemoteException
startIndex
- index of the first result to retrievenumberResults
- total number of result to retrieveRemoteException
- for communication-related exceptionsprotected T getOneByField(SelectorFields.FieldType<T> selectorField, Object fieldValue) throws RemoteException
selectorField
- name of the fieldfieldValue
- value for the field in the predicateRemoteException
- for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, Object fieldValue) throws RemoteException
selectorField
- name of the fieldfieldValue
- value for the field in the predicateRemoteException
- for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, List<Long> fieldValues) throws RemoteException
selectorField
- name of the fieldfieldValues
- list of values for the field in the predicateRemoteException
- for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, long fieldValue, int startIndex, int numberResults) throws RemoteException
selectorField
- name of the fieldfieldValue
- list of values for the field in the predicatestartIndex
- index of the first resultnumberResults
- number of resultsRemoteException
- for communication-related exceptionsprotected List<T> getByField(SelectorFields.FieldType<T> selectorField, String fieldValue, int startIndex, int numberResults) throws RemoteException
selectorField
- name of the fieldfieldValue
- list of values for the field in the predicatestartIndex
- index of the first resultnumberResults
- number of resultsRemoteException
- for communication-related exceptionsprotected List<T> getByFieldContainsAny(SelectorFields.FieldType<T> selectorField, List<Long> fieldValues) throws RemoteException
selectorField
- name of the fieldfieldValues
- list of values for the field in the predicateRemoteException
- for communication-related exceptionsCopyright © 2015. All Rights Reserved.