Package com.google.gerrit.server.account
Interface Accounts
- All Known Implementing Classes:
AccountsNoteDbImpl
public interface Accounts
Class to access accounts.
-
Method Summary
Modifier and TypeMethodDescriptionall()
Returns all accounts.allIds()
Returns all account IDs.firstNIds
(int n) Returns the first n account IDs.get
(Account.Id accountId) Gets the account state for the given ID.get
(Collection<Account.Id> accountIds) Gets the account states for all the given IDs.boolean
Checks if any account exists.
-
Method Details
-
get
Optional<AccountState> get(Account.Id accountId) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException Gets the account state for the given ID.- Returns:
- the account state if found,
Optional.empty
otherwise. - Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
get
List<AccountState> get(Collection<Account.Id> accountIds) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException Gets the account states for all the given IDs.- Returns:
- the account states.
- Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
all
Returns all accounts.- Returns:
- all accounts
- Throws:
IOException
-
allIds
Returns all account IDs.- Returns:
- all account IDs
- Throws:
IOException
-
firstNIds
Returns the first n account IDs.- Parameters:
n
- the number of account IDs that should be returned- Returns:
- first n account IDs
- Throws:
IOException
-
hasAnyAccount
Checks if any account exists.- Returns:
true
if at least one account exists, otherwisefalse
.- Throws:
IOException
-