Package com.google.gerrit.reviewdb.client

Examples of com.google.gerrit.reviewdb.client.PatchSetApproval.cache()


    for (final ApprovalCategoryValue.Id want : approvals) {
      PatchSetApproval a = mine.get(want.getParentKey());
      if (a == null) {
        a = new PatchSetApproval(new PatchSetApproval.Key(//
            patchSetId, user.getAccountId(), want.getParentKey()), want.get());
        a.cache(change);
        ins.add(a);
        all.add(a);
        mine.put(a.getCategoryId(), a);
        dirty.add(a.getCategoryId());
      }
View Full Code Here


        functionStateFactory.create(ctl, patchSetId, all);
    for (final ApprovalCategoryValue.Id want : approvals) {
      final PatchSetApproval a = mine.get(want.getParentKey());
      final short o = a.getValue();
      a.setValue(want.get());
      a.cache(change);
      if (!ApprovalCategory.SUBMIT.equals(a.getCategoryId())) {
        functionState.normalize(types.byId(a.getCategoryId()), a);
      }
      if (want.get() != a.getValue()) {
        throw new InvalidChangeOperationException(
View Full Code Here

    // Update dashboards for everyone else.
    //
    for (PatchSetApproval a : all) {
      if (!user.getAccountId().equals(a.getAccountId())) {
        a.cache(change);
        upd.add(a);
      }
    }

    db.patchSetApprovals().update(upd);
View Full Code Here

  private PatchSetApproval dummyApproval(final Change change,
      final PatchSet.Id patchSetId, final Account.Id reviewerId) {
    final PatchSetApproval dummyApproval =
        new PatchSetApproval(new PatchSetApproval.Key(patchSetId, reviewerId,
            addReviewerCategoryId), (short) 0);
    dummyApproval.cache(change);
    return dummyApproval;
  }

  public static boolean isLegalReviewerGroup(final AccountGroup.UUID groupUUID) {
    return !(AccountGroup.ANONYMOUS_USERS.equals(groupUUID)
View Full Code Here

    ApprovalCategory.Id catId = allTypes.get(allTypes.size() - 1).getCategory().getId();
    for (Account.Id account : need) {
      PatchSetApproval psa = new PatchSetApproval(
          new PatchSetApproval.Key(ps.getId(), account, catId),
          (short) 0);
      psa.cache(change);
      cells.add(psa);
    }
    db.patchSetApprovals().insert(cells);
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.