Query.Builder
Stay organized with collections
Save and categorize content based on your preferences.
A builder for creating queries.
Public Constructor Summary
|
|
|
Query.Builder( Query
query)
Creates a new builder with initial values from an existing query.
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Constructors
public Query.Builder (Query
query)
Creates a new builder with initial values from an existing query.
Public Methods
Adds a search filter to the query. If more than one filter is added, they are
combined with
and(Filter, Filter)
. Skips MatchAllFilter
.
This method was deprecated.
Paging is not supported.
Set the page token to retrieve the next page of results.
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 |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`Query.Builder` is used for creating queries in Google Drive Android API."],["It allows adding filters using `addFilter` and combining them with logical AND."],["`build()` method creates a `Query` object from the builder."],["`setPageToken` is deprecated and paging is not supported."],["`setSortOrder` allows defining the order of query results using a `SortOrder` object."]]],["The `Query.Builder` class facilitates the creation of queries. It offers two constructors: one for a new builder and another to initialize from an existing query. Key actions include `addFilter` to incorporate search filters, `build` to finalize the query, and `setSortOrder` to arrange results using a `SortOrder`. The method `setPageToken` is deprecated. Multiple calls to set the `sortOrder` will reset the previous order. The method `addFilter` combines multiple filters with the `and` operator.\n"]]