Package com.google.gerrit.server.notedb
Class StarredChangesUtilNoteDbImpl
java.lang.Object
com.google.gerrit.server.notedb.StarredChangesUtilNoteDbImpl
- All Implemented Interfaces:
StarredChangesReader
,StarredChangesUtil
,StarredChangesWriter
-
Method Summary
Modifier and TypeMethodDescriptionareStarred
(org.eclipse.jgit.lib.Repository allUsersRepo, List<Change.Id> virtualIds, Account.Id caller) Returns a subset of change IDs among the inputchangeIds
list that are starred by thecaller
user.com.google.common.collect.ImmutableSet<Change.Id>
byAccountId
(Account.Id accountId) com.google.common.collect.ImmutableSet<Change.Id>
byAccountId
(Account.Id accountId, boolean skipInvalidChanges) com.google.common.collect.ImmutableMap<Account.Id,
org.eclipse.jgit.lib.Ref> boolean
isStarred
(Account.Id accountId, Change.Id virtualId) void
star
(Account.Id accountId, Change.Id virtualId) void
unstar
(Account.Id accountId, Change.Id virtualId) void
unstarAllForChangeDeletion
(Change.Id virtualId) Unstar the given change for all users.
-
Method Details
-
isStarred
- Specified by:
isStarred
in interfaceStarredChangesReader
-
star
- Specified by:
star
in interfaceStarredChangesWriter
-
unstar
- Specified by:
unstar
in interfaceStarredChangesWriter
-
areStarred
public Set<Change.Id> areStarred(org.eclipse.jgit.lib.Repository allUsersRepo, List<Change.Id> virtualIds, Account.Id caller) Description copied from interface:StarredChangesReader
Returns a subset of change IDs among the inputchangeIds
list that are starred by thecaller
user.- Specified by:
areStarred
in interfaceStarredChangesReader
-
unstarAllForChangeDeletion
Description copied from interface:StarredChangesWriter
Unstar the given change for all users.Intended for use only when we're about to delete a change. For that reason, the change is not reindexed.
- Specified by:
unstarAllForChangeDeletion
in interfaceStarredChangesWriter
- Parameters:
virtualId
- change ID.- Throws:
IOException
- if an error occurred.
-
byChange
public com.google.common.collect.ImmutableMap<Account.Id,org.eclipse.jgit.lib.Ref> byChange(Change.Id virtualId) - Specified by:
byChange
in interfaceStarredChangesReader
-
byAccountId
- Specified by:
byAccountId
in interfaceStarredChangesReader
-
byAccountId
public com.google.common.collect.ImmutableSet<Change.Id> byAccountId(Account.Id accountId, boolean skipInvalidChanges) - Specified by:
byAccountId
in interfaceStarredChangesReader
-