Class Accounts.QueryRequest
- java.lang.Object
-
- com.google.gerrit.extensions.api.accounts.Accounts.QueryRequest
-
- Enclosing interface:
- Accounts
public abstract static class Accounts.QueryRequest extends Object
API for setting parameters and getting result. Used forquery().- See Also:
Accounts.query()
-
-
Constructor Summary
Constructors Constructor Description QueryRequest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract List<AccountInfo>get()Execute query and return a list of accounts.intgetLimit()Set<ListAccountsOption>getOptions()StringgetQuery()intgetStart()booleangetSuggest()Accounts.QueryRequestwithLimit(int limit)Set limit for returned list of accounts.Accounts.QueryRequestwithOption(ListAccountsOption options)Set an option on the request, appending to existing options.Accounts.QueryRequestwithOptions(ListAccountsOption... options)Set options on the request, appending to existing options.Accounts.QueryRequestwithOptions(Set<ListAccountsOption> options)Set options on the request, replacing existing options.Accounts.QueryRequestwithQuery(String query)Set query.Accounts.QueryRequestwithStart(int start)Set number of accounts to skip.Accounts.QueryRequestwithSuggest(boolean suggest)
-
-
-
Method Detail
-
get
public abstract List<AccountInfo> get() throws RestApiException
Execute query and return a list of accounts.- Throws:
RestApiException
-
withQuery
public Accounts.QueryRequest withQuery(String query)
Set query.- Parameters:
query- needs to be in human-readable form.
-
withLimit
public Accounts.QueryRequest withLimit(int limit)
Set limit for returned list of accounts. Optional; server-default is used when not provided.
-
withStart
public Accounts.QueryRequest withStart(int start)
Set number of accounts to skip. Optional; no accounts are skipped when not provided.
-
withSuggest
public Accounts.QueryRequest withSuggest(boolean suggest)
-
withOption
public Accounts.QueryRequest withOption(ListAccountsOption options)
Set an option on the request, appending to existing options.
-
withOptions
public Accounts.QueryRequest withOptions(ListAccountsOption... options)
Set options on the request, appending to existing options.
-
withOptions
public Accounts.QueryRequest withOptions(Set<ListAccountsOption> options)
Set options on the request, replacing existing options.
-
getQuery
public String getQuery()
-
getLimit
public int getLimit()
-
getStart
public int getStart()
-
getSuggest
public boolean getSuggest()
-
getOptions
public Set<ListAccountsOption> getOptions()
-
-