AI-generated Key Takeaways
-
Query.Builder is a builder class used for creating queries.
-
You can create a new builder from scratch or with initial values from an existing query.
-
You can add search filters and set the sort order for the query results using the builder.
-
The setPageToken method is deprecated as paging is not supported.
A builder for creating queries.
Public Constructor Summary
Public Method Summary
| Query.Builder | |
| Query |
build()
|
| Query.Builder | |
| Query.Builder |
Inherited Method Summary
Public Constructors
public Query.Builder ()
public Query.Builder (Query query)
Creates a new builder with initial values from an existing query.
Public Methods
public Query.Builder addFilter (Filter filter)
Adds a search filter to the query. If more than one filter is added, they are
combined with
and(Filter, Filter). Skips MatchAllFilter.
public Query build ()
public Query.Builder setPageToken (String token)
This method was deprecated.
Paging is not supported.
Set the page token to retrieve the next page of results.
public Query.Builder setSortOrder (SortOrder sortOrder)
Sets the SortOrder
to be used to sort the query results. Use SortOrder.Builder
to build the sort order as required. Multiple calls to this method resets the sort
order set in previous calls.
Parameters
| sortOrder | the order to be used to sort the query results |
|---|