public interface ChangeContext extends Context
BatchUpdateOp.updateChange(com.google.gerrit.server.update.ChangeContext)
phase.
A single ChangeContext
corresponds to updating a single change; if a BatchUpdate
spans multiple changes, then multiple ChangeContext
instances will be
created.
Modifier and Type | Method and Description |
---|---|
void |
deleteChange()
Instruct
BatchUpdate to delete this change. |
default Change |
getChange() |
ChangeNotes |
getNotes()
Get the up-to-date notes for this change.
|
ChangeUpdate |
getUpdate(PatchSet.Id psId)
Get an update for this change at a given patch set.
|
getAccount, getAccountId, getIdentifiedUser, getNotify, getProject, getRepoView, getRevWalk, getTimeZone, getUser, getWhen
ChangeUpdate getUpdate(PatchSet.Id psId)
A single operation can modify changes at different patch sets. Commits in the NoteDb graph within this update are created in patch set order.
To get the current patch set ID, use PatchSetUtil.current(com.google.gerrit.server.notedb.ChangeNotes)
.
psId
- patch set ID.ChangeNotes getNotes()
The change data is read within the same transaction that BatchUpdateOp.updateChange(ChangeContext)
is executing.
void deleteChange()
BatchUpdate
to delete this change.
If called, all other updates are ignored.
default Change getChange()
getNotes()
.