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.

  • Method Details

    • byDefault

      public List<AccountState> byDefault(String query, boolean canSeeSecondaryEmails)
    • 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)