public class ChangeUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
bumpRowVersionNotLastUpdatedOn(com.google.gerrit.reviewdb.client.Change.Id id,
com.google.gerrit.reviewdb.server.ReviewDb db) |
static void |
computeSortKey(com.google.gerrit.reviewdb.client.Change c) |
void |
deleteDraftChange(com.google.gerrit.reviewdb.client.Change.Id changeId) |
void |
deleteDraftChange(com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId) |
void |
deleteOnlyDraftPatchSet(com.google.gerrit.reviewdb.client.PatchSet patch,
com.google.gerrit.reviewdb.client.Change change) |
com.google.gerrit.reviewdb.client.Change.Id |
editCommitMessage(ChangeControl ctl,
com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId,
java.lang.String message,
org.eclipse.jgit.lib.PersonIdent myIdent) |
static void |
insertAncestors(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.PatchSet.Id id,
org.eclipse.jgit.revwalk.RevCommit src) |
static java.lang.String |
messageUUID(com.google.gerrit.reviewdb.server.ReviewDb db)
Generate a new unique identifier for change message entities.
|
static com.google.gerrit.reviewdb.client.PatchSet.Id |
nextPatchSetId(java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> allRefs,
com.google.gerrit.reviewdb.client.PatchSet.Id id) |
static com.google.gerrit.reviewdb.client.PatchSet.Id |
nextPatchSetId(org.eclipse.jgit.lib.Repository git,
com.google.gerrit.reviewdb.client.PatchSet.Id id) |
static long |
parseSortKey(java.lang.String sortKey) |
com.google.gerrit.reviewdb.client.Change.Id |
revert(ChangeControl ctl,
com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId,
java.lang.String message,
org.eclipse.jgit.lib.PersonIdent myIdent,
SshInfo sshInfo) |
static java.lang.String |
sortKey(long lastUpdatedMs,
int id) |
static void |
touch(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.server.ReviewDb db) |
static void |
updated(com.google.gerrit.reviewdb.client.Change c) |
public static java.lang.String messageUUID(com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
db
- the database connection, used to increment the change message
allocation sequence.com.google.gwtorm.server.OrmException
- the database couldn't be incremented.public static void touch(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void bumpRowVersionNotLastUpdatedOn(com.google.gerrit.reviewdb.client.Change.Id id, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static void updated(com.google.gerrit.reviewdb.client.Change c)
public static void insertAncestors(com.google.gerrit.reviewdb.server.ReviewDb db, com.google.gerrit.reviewdb.client.PatchSet.Id id, org.eclipse.jgit.revwalk.RevCommit src) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public static java.lang.String sortKey(long lastUpdatedMs, int id)
public static long parseSortKey(java.lang.String sortKey)
public static void computeSortKey(com.google.gerrit.reviewdb.client.Change c)
public static com.google.gerrit.reviewdb.client.PatchSet.Id nextPatchSetId(java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> allRefs, com.google.gerrit.reviewdb.client.PatchSet.Id id)
public static com.google.gerrit.reviewdb.client.PatchSet.Id nextPatchSetId(org.eclipse.jgit.lib.Repository git, com.google.gerrit.reviewdb.client.PatchSet.Id id) throws java.io.IOException
java.io.IOException
public com.google.gerrit.reviewdb.client.Change.Id revert(ChangeControl ctl, com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId, java.lang.String message, org.eclipse.jgit.lib.PersonIdent myIdent, SshInfo sshInfo) throws NoSuchChangeException, com.google.gerrit.common.errors.EmailException, com.google.gwtorm.server.OrmException, org.eclipse.jgit.errors.MissingObjectException, org.eclipse.jgit.errors.IncorrectObjectTypeException, java.io.IOException, InvalidChangeOperationException
NoSuchChangeException
com.google.gerrit.common.errors.EmailException
com.google.gwtorm.server.OrmException
org.eclipse.jgit.errors.MissingObjectException
org.eclipse.jgit.errors.IncorrectObjectTypeException
java.io.IOException
InvalidChangeOperationException
public com.google.gerrit.reviewdb.client.Change.Id editCommitMessage(ChangeControl ctl, com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId, java.lang.String message, org.eclipse.jgit.lib.PersonIdent myIdent) throws NoSuchChangeException, com.google.gerrit.common.errors.EmailException, com.google.gwtorm.server.OrmException, org.eclipse.jgit.errors.MissingObjectException, org.eclipse.jgit.errors.IncorrectObjectTypeException, java.io.IOException, InvalidChangeOperationException, PatchSetInfoNotAvailableException
NoSuchChangeException
com.google.gerrit.common.errors.EmailException
com.google.gwtorm.server.OrmException
org.eclipse.jgit.errors.MissingObjectException
org.eclipse.jgit.errors.IncorrectObjectTypeException
java.io.IOException
InvalidChangeOperationException
PatchSetInfoNotAvailableException
public void deleteDraftChange(com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId) throws NoSuchChangeException, com.google.gwtorm.server.OrmException, java.io.IOException
NoSuchChangeException
com.google.gwtorm.server.OrmException
java.io.IOException
public void deleteDraftChange(com.google.gerrit.reviewdb.client.Change.Id changeId) throws NoSuchChangeException, com.google.gwtorm.server.OrmException, java.io.IOException
NoSuchChangeException
com.google.gwtorm.server.OrmException
java.io.IOException
public void deleteOnlyDraftPatchSet(com.google.gerrit.reviewdb.client.PatchSet patch, com.google.gerrit.reviewdb.client.Change change) throws NoSuchChangeException, com.google.gwtorm.server.OrmException, java.io.IOException
NoSuchChangeException
com.google.gwtorm.server.OrmException
java.io.IOException