Class InternalAccountQuery
- java.lang.Object
-
- com.google.gerrit.index.query.InternalQuery<AccountState,InternalAccountQuery>
-
- com.google.gerrit.server.query.account.InternalAccountQuery
-
public class InternalAccountQuery extends InternalQuery<AccountState,InternalAccountQuery>
Query wrapper for the account index.Instances are one-time-use. Other singleton classes should inject a Provider rather than holding on to a single instance.
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.index.query.InternalQuery
indexConfig
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AccountState>
byDefault(String query)
List<AccountState>
byExternalId(ExternalId.Key externalId)
List<AccountState>
byExternalId(String scheme, String id)
List<AccountState>
byFullName(String fullName)
List<AccountState>
byPreferredEmail(String email)
Queries for accounts that have a preferred email that exactly matches the given email.com.google.common.collect.Multimap<String,AccountState>
byPreferredEmail(List<String> emails)
Makes multiple queries for accounts by preferred email (exact match).List<AccountState>
byWatchedProject(Project.NameKey project)
AccountState
oneByExternalId(ExternalId.Key externalId)
-
Methods inherited from class com.google.gerrit.index.query.InternalQuery
enforceVisibility, noFields, query, query, queryExhaustively, schema, self, setLimit, setRequestedFields
-
-
-
-
Method Detail
-
byDefault
public List<AccountState> byDefault(String query)
-
byExternalId
public List<AccountState> byExternalId(String scheme, String id)
-
byExternalId
public List<AccountState> byExternalId(ExternalId.Key externalId)
-
oneByExternalId
public AccountState oneByExternalId(ExternalId.Key externalId)
-
byFullName
public List<AccountState> byFullName(String fullName)
-
byPreferredEmail
public List<AccountState> byPreferredEmail(String email)
Queries for accounts that have a preferred email that exactly matches the given email.- Parameters:
email
- preferred email by which accounts should be found- Returns:
- list of accounts that have a preferred email that exactly matches the given email
-
byPreferredEmail
public com.google.common.collect.Multimap<String,AccountState> byPreferredEmail(List<String> emails)
Makes multiple queries for accounts by preferred email (exact match).- Parameters:
emails
- preferred emails by which accounts should be found- Returns:
- multimap of the given emails to accounts that have a preferred email that exactly matches this email
-
byWatchedProject
public List<AccountState> byWatchedProject(Project.NameKey project)
-
-