public class SelectorBuilder extends Object
Selector
objects.
This builder is not thread safe.Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_DATE_FORMAT
The default date format for the AdWords API
|
Constructor and Description |
---|
SelectorBuilder() |
Modifier and Type | Method and Description |
---|---|
com.google.api.ads.adwords.jaxws.v201601.cm.Selector |
build()
Builds a new Selector.
|
SelectorBuilder |
contains(EntityField field,
String propertyValue)
Adds the predicate contains to the selector for the given field and value.
|
SelectorBuilder |
contains(String field,
String propertyValue)
Adds the predicate contains to the selector for the given field and value.
|
SelectorBuilder |
containsAll(EntityField field,
String... values)
Adds the predicate contains all to the selector for the given field and value.
|
SelectorBuilder |
containsAll(String field,
String... values)
Adds the predicate contains all to the selector for the given field and value.
|
SelectorBuilder |
containsAny(EntityField field,
String... values)
Adds the predicate contains any to the selector for the given field and value.
|
SelectorBuilder |
containsAny(String field,
String... values)
Adds the predicate contains any to the selector for the given field and value.
|
SelectorBuilder |
containsIgnoreCase(EntityField field,
String propertyValue)
Adds the predicate contains ignore case to the selector for the given field and value.
|
SelectorBuilder |
containsIgnoreCase(String field,
String propertyValue)
Adds the predicate contains ignore case to the selector for the given field and value.
|
SelectorBuilder |
containsNone(EntityField field,
String... values)
Adds the predicate contains none to the selector for the given field and value.
|
SelectorBuilder |
containsNone(String field,
String... values)
Adds the predicate contains none to the selector for the given field and value.
|
SelectorBuilder |
doesNotContain(EntityField field,
String propertyValue)
Adds the predicate does not contain to the selector for the given field and value.
|
SelectorBuilder |
doesNotContain(String field,
String propertyValue)
Adds the predicate does not contain to the selector for the given field and value.
|
SelectorBuilder |
doesNotContainIgnoreCase(EntityField field,
String propertyValue)
Adds the predicate does not contain ignore case to the selector for the given field and
value.
|
SelectorBuilder |
doesNotContainIgnoreCase(String field,
String propertyValue)
Adds the predicate does not contain ignore case to the selector for the given field and
value.
|
SelectorBuilder |
equals(EntityField field,
String propertyValue)
Adds the predicate equals to the selector for the given field and value.
|
SelectorBuilder |
equals(String field,
String propertyValue)
Adds the predicate equals to the selector for the given field and value.
|
SelectorBuilder |
equalsId(Long id)
Adds the predicate equals to the selector for the entity Id and the given id value.
|
SelectorBuilder |
fields(EntityField... fields)
Chooses the set of fields that will be selected via the API.
|
SelectorBuilder |
fields(String... fields)
Chooses the set of fields that will be selected via the API.
|
SelectorBuilder |
forDateRange(org.joda.time.DateTime start,
org.joda.time.DateTime end)
Restricts the Selector by the date range.
|
SelectorBuilder |
greaterThan(EntityField field,
long propertyValue)
Adds the predicate greater than to the selector for the given field and value.
|
SelectorBuilder |
greaterThan(String field,
long propertyValue)
Adds the predicate greater than to the selector for the given field and value.
|
SelectorBuilder |
greaterThanEquals(EntityField field,
long propertyValue)
Adds the predicate greater than equals to the selector for the given field and value.
|
SelectorBuilder |
greaterThanEquals(String field,
long propertyValue)
Adds the predicate greater than equals to the selector for the given field and value.
|
SelectorBuilder |
in(EntityField field,
String... values)
Adds the predicate in to the selector for the given field and set of values.
|
SelectorBuilder |
in(String field,
String... values)
Adds the predicate in to the selector for the given field and set of values.
|
SelectorBuilder |
increaseOffsetBy(int additionalOffset)
Adds the given amount to the current offset.
|
SelectorBuilder |
lessThan(EntityField field,
long propertyValue)
Adds the predicate less than to the selector for the given field and value.
|
SelectorBuilder |
lessThan(String field,
long propertyValue)
Adds the predicate less than to the selector for the given field and value.
|
SelectorBuilder |
lessThanEquals(EntityField field,
long propertyValue)
Adds the predicate less than equals to the selector for the given field and value.
|
SelectorBuilder |
lessThanEquals(String field,
long propertyValue)
Adds the predicate less than equals to the selector for the given field and value.
|
SelectorBuilder |
limit(int limit)
Sets the limit amount of results that will be brought back.
|
SelectorBuilder |
notEquals(EntityField field,
String propertyValue)
Adds the predicate not equals to the selector for the given field and value.
|
SelectorBuilder |
notEquals(String field,
String propertyValue)
Adds the predicate not equals to the selector for the given field and value.
|
SelectorBuilder |
notIn(EntityField field,
String... values)
Adds the predicate not in to the selector for the given field and set of values.
|
SelectorBuilder |
notIn(String field,
String... values)
Adds the predicate not in to the selector for the given field and set of values.
|
SelectorBuilder |
offset(int offset)
Sets the offset for the start point of the query.
|
SelectorBuilder |
orderAscBy(EntityField field)
Adds the order by the given field, on ASCENDING sort.
|
SelectorBuilder |
orderAscBy(String field)
Adds the order by the given field, on ASCENDING sort.
|
SelectorBuilder |
orderDescBy(EntityField field)
Adds the order by the given field, on DESCENDING sort.
|
SelectorBuilder |
orderDescBy(String field)
Adds the order by the given field, on DESCENDING sort.
|
SelectorBuilder |
removeLimitAndOffset()
Removes the offset and limit information from the selector.
|
SelectorBuilder |
removeOrderBy(EntityField field)
Removes the order that is associated with the given field.
|
SelectorBuilder |
removeOrderBy(String field)
Removes the order that is associated with the given field.
|
protected static final String DEFAULT_DATE_FORMAT
public com.google.api.ads.adwords.jaxws.v201601.cm.Selector build()
When a Selector is built by this method, the state of the builder doesn't change. If you need to clean the builder, the best way to do it, is by creating a new instance.
public SelectorBuilder fields(String... fields)
fields
- the set of fields of the given entity.public SelectorBuilder fields(EntityField... fields)
Calling this method multiple times will overwrite the previous fields that were set.
fields
- the set of fields of the given entity.public SelectorBuilder increaseOffsetBy(int additionalOffset)
additionalOffset
- the amount that will be added to the offsetpublic SelectorBuilder limit(int limit)
public SelectorBuilder offset(int offset)
offset
- the offsetpublic SelectorBuilder removeLimitAndOffset()
public SelectorBuilder orderAscBy(String field)
public SelectorBuilder orderAscBy(EntityField field)
public SelectorBuilder orderDescBy(String field)
public SelectorBuilder orderDescBy(EntityField field)
public SelectorBuilder removeOrderBy(String field)
public SelectorBuilder removeOrderBy(EntityField field)
public SelectorBuilder forDateRange(org.joda.time.DateTime start, org.joda.time.DateTime end)
public SelectorBuilder equals(String field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder equals(EntityField field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder notEquals(String field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder notEquals(EntityField field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder contains(String field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder contains(EntityField field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder containsIgnoreCase(String field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder containsIgnoreCase(EntityField field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder doesNotContain(String field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder doesNotContain(EntityField field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder doesNotContainIgnoreCase(String field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder doesNotContainIgnoreCase(EntityField field, String propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder greaterThan(String field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder greaterThan(EntityField field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder greaterThanEquals(String field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder greaterThanEquals(EntityField field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder lessThan(String field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder lessThan(EntityField field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder lessThanEquals(String field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder lessThanEquals(EntityField field, long propertyValue)
propertyValue
- the property value as a String independently of the field type. The caller
should take care of the formatting if it is necessarypublic SelectorBuilder equalsId(Long id)
id
- the ID of the current entity. This field represents different values for different
entity typespublic SelectorBuilder in(String field, String... values)
public SelectorBuilder in(EntityField field, String... values)
public SelectorBuilder notIn(String field, String... values)
public SelectorBuilder notIn(EntityField field, String... values)
public SelectorBuilder containsAny(String field, String... values)
public SelectorBuilder containsAny(EntityField field, String... values)
public SelectorBuilder containsAll(String field, String... values)
public SelectorBuilder containsAll(EntityField field, String... values)
public SelectorBuilder containsNone(String field, String... values)
public SelectorBuilder containsNone(EntityField field, String... values)
Copyright © 2016. All Rights Reserved.