Package com.google.cloud.firestore
Class Filter
java.lang.Object
com.google.cloud.firestore.Filter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilterCreates a new filter that is a conjunction of the given filters.static FilterarrayContains(FieldPath fieldPath, Object value) Creates a new filter for checking that the given array field contains the given value.static FilterarrayContains(String field, Object value) Creates a new filter for checking that the given array field contains the given value.static FilterarrayContainsAny(FieldPath fieldPath, Object value) Creates a new filter for checking that the given array field contains any of the given values.static FilterarrayContainsAny(String field, Object value) Creates a new filter for checking that the given array field contains any of the given values.static FilterCreates a new filter for checking that the given field is equal to the given value.static FilterCreates a new filter for checking that the given field is equal to the given value.static FiltergreaterThan(FieldPath fieldPath, Object value) Creates a new filter for checking that the given field is greater than the given value.static FiltergreaterThan(String field, Object value) Creates a new filter for checking that the given field is greater than the given value.static FiltergreaterThanOrEqualTo(FieldPath fieldPath, Object value) Creates a new filter for checking that the given field is greater than or equal to the given value.static FiltergreaterThanOrEqualTo(String field, Object value) Creates a new filter for checking that the given field is greater than or equal to the given value.static FilterCreates a new filter for checking that the given field equals any of the given values.static FilterCreates a new filter for checking that the given field equals any of the given values.static FilterCreates a new filter for checking that the given field is less than the given value.static FilterCreates a new filter for checking that the given field is less than the given value.static FilterlessThanOrEqualTo(FieldPath fieldPath, Object value) Creates a new filter for checking that the given field is less than or equal to the given value.static FilterlessThanOrEqualTo(String field, Object value) Creates a new filter for checking that the given field is less than or equal to the given value.static FilternotEqualTo(FieldPath fieldPath, Object value) Creates a new filter for checking that the given field is not equal to the given value.static FilternotEqualTo(String field, Object value) Creates a new filter for checking that the given field is not equal to the given value.static FilternotInArray(FieldPath fieldPath, Object value) Creates a new filter for checking that the given field does not equal any of the given values.static FilternotInArray(String field, Object value) Creates a new filter for checking that the given field does not equal any of the given values.static FilterCreates a new filter that is a disjunction of the given filters.
-
Constructor Details
-
Filter
public Filter()
-
-
Method Details
-
equalTo
Creates a new filter for checking that the given field is equal to the given value.- Parameters:
field- The field used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
equalTo
Creates a new filter for checking that the given field is equal to the given value.- Parameters:
fieldPath- The field path used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
notEqualTo
Creates a new filter for checking that the given field is not equal to the given value.- Parameters:
field- The field used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
notEqualTo
Creates a new filter for checking that the given field is not equal to the given value.- Parameters:
fieldPath- The field path used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
greaterThan
Creates a new filter for checking that the given field is greater than the given value.- Parameters:
field- The field used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
greaterThan
Creates a new filter for checking that the given field is greater than the given value.- Parameters:
fieldPath- The field path used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
greaterThanOrEqualTo
Creates a new filter for checking that the given field is greater than or equal to the given value.- Parameters:
field- The field used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
greaterThanOrEqualTo
@Nonnull public static Filter greaterThanOrEqualTo(@Nonnull FieldPath fieldPath, @Nullable Object value) Creates a new filter for checking that the given field is greater than or equal to the given value.- Parameters:
fieldPath- The field path used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
lessThan
Creates a new filter for checking that the given field is less than the given value.- Parameters:
field- The field used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
lessThan
Creates a new filter for checking that the given field is less than the given value.- Parameters:
fieldPath- The field path used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
lessThanOrEqualTo
Creates a new filter for checking that the given field is less than or equal to the given value.- Parameters:
field- The field used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
lessThanOrEqualTo
@Nonnull public static Filter lessThanOrEqualTo(@Nonnull FieldPath fieldPath, @Nullable Object value) Creates a new filter for checking that the given field is less than or equal to the given value.- Parameters:
fieldPath- The field path used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
arrayContains
Creates a new filter for checking that the given array field contains the given value.- Parameters:
field- The field used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
arrayContains
Creates a new filter for checking that the given array field contains the given value.- Parameters:
fieldPath- The field path used for the filter.value- The value used for the filter.- Returns:
- The newly created filter.
-
arrayContainsAny
Creates a new filter for checking that the given array field contains any of the given values.- Parameters:
field- The field used for the filter.value- The list of values used for the filter.- Returns:
- The newly created filter.
-
arrayContainsAny
@Nonnull public static Filter arrayContainsAny(@Nonnull FieldPath fieldPath, @Nullable Object value) Creates a new filter for checking that the given array field contains any of the given values.- Parameters:
fieldPath- The field path used for the filter.value- The list of values used for the filter.- Returns:
- The newly created filter.
-
inArray
Creates a new filter for checking that the given field equals any of the given values.- Parameters:
field- The field used for the filter.value- The list of values used for the filter.- Returns:
- The newly created filter.
-
inArray
Creates a new filter for checking that the given field equals any of the given values.- Parameters:
fieldPath- The field path used for the filter.value- The list of values used for the filter.- Returns:
- The newly created filter.
-
notInArray
Creates a new filter for checking that the given field does not equal any of the given values.- Parameters:
field- The field path used for the filter.value- The list of values used for the filter.- Returns:
- The newly created filter.
-
notInArray
Creates a new filter for checking that the given field does not equal any of the given values.- Parameters:
fieldPath- The field path used for the filter.value- The list of values used for the filter.- Returns:
- The newly created filter.
-
or
Creates a new filter that is a disjunction of the given filters. A disjunction filter includes a document if it satisfies any of the given filters.- Parameters:
filters- The list of filters to perform a disjunction for.- Returns:
- The newly created filter.
-
and
Creates a new filter that is a conjunction of the given filters. A conjunction filter includes a document if it satisfies all of the given filters.- Parameters:
filters- The list of filters to perform a conjunction for.- Returns:
- The newly created filter.
-