Package com.google.gerrit.reviewdb.client

Examples of com.google.gerrit.reviewdb.client.AccountGroupInclude$Key


    validateQuery(query);
    validateSplitSize(numSplits);

    List<Query> splits = new ArrayList<Query>(numSplits);
    List<Key> scatterKeys = getScatterKeys(numSplits, query, datastore);
    Key lastKey = null;
    for (Key nextKey : getSplitKey(scatterKeys, numSplits)) {
      splits.add(createSplit(lastKey, nextKey, query));
      lastKey = nextKey;
    }
    splits.add(createSplit(lastKey, null, query));
View Full Code Here


    }

    void setEnabled(final boolean enabled) {
      this.enabled = enabled;
      for (int row = 1; row < table.getRowCount(); row++) {
        final AccountGroupInclude k = getRowItem(row);
        if (k != null) {
          ((CheckBox) table.getWidget(row, 1)).setEnabled(enabled);
        }
      }
    }
View Full Code Here

    void deleteChecked() {
      final HashSet<AccountGroupInclude.Key> keys =
          new HashSet<AccountGroupInclude.Key>();
      for (int row = 1; row < table.getRowCount(); row++) {
        final AccountGroupInclude k = getRowItem(row);
        if (k != null && ((CheckBox) table.getWidget(row, 1)).getValue()) {
          keys.add(k.getKey());
        }
      }
      if (!keys.isEmpty()) {
        Util.GROUP_SVC.deleteGroupIncludes(getGroupId(), keys,
            new GerritCallback<VoidResult>() {
              public void onSuccess(final VoidResult result) {
                for (int row = 1; row < table.getRowCount();) {
                  final AccountGroupInclude k = getRowItem(row);
                  if (k != null && keys.contains(k.getKey())) {
                    table.removeRow(row);
                  } else {
                    row++;
                  }
                }
View Full Code Here

    final List<AccountGroupInclude> includeList =
      new ArrayList<AccountGroupInclude>();
    final List<AccountGroupIncludeAudit> includesAudit =
      new ArrayList<AccountGroupIncludeAudit>();
    for (AccountGroup.Id includeId : groups) {
      final AccountGroupInclude groupInclude =
        new AccountGroupInclude(new AccountGroupInclude.Key(groupId, includeId));
      includeList.add(groupInclude);

      final AccountGroupIncludeAudit audit =
        new AccountGroupIncludeAudit(groupInclude, currentUser.getAccountId());
      includesAudit.add(audit);
View Full Code Here

          throw new Failure(new NoSuchEntityException());
        }

        final AccountGroupInclude.Key key =
            new AccountGroupInclude.Key(groupId, a.getId());
        AccountGroupInclude m = db.accountGroupIncludes().get(key);
        if (m == null) {
          m = new AccountGroupInclude(key);
          db.accountGroupIncludesAudit().insert(
              Collections.singleton(new AccountGroupIncludeAudit(m,
                  getAccountId())));
          db.accountGroupIncludes().insert(Collections.singleton(m));
          groupIncludeCache.evictInclude(a.getGroupUUID());
View Full Code Here

        }

        final Account.Id me = getAccountId();
        final Set<AccountGroup.Id> groupsToEvict = new HashSet<AccountGroup.Id>();
        for (final AccountGroupInclude.Key k : keys) {
          final AccountGroupInclude m =
              db.accountGroupIncludes().get(k);
          if (m != null) {
            if (!control.canRemoveGroup(m.getIncludeId())) {
              throw new Failure(new NoSuchEntityException());
            }

            AccountGroupIncludeAudit audit = null;
            for (AccountGroupIncludeAudit a : db
                .accountGroupIncludesAudit().byGroupInclude(
                    m.getGroupId(), m.getIncludeId())) {
              if (a.isActive()) {
                audit = a;
                break;
              }
            }
View Full Code Here

TOP

Related Classes of com.google.gerrit.reviewdb.client.AccountGroupInclude$Key

Copyright © 2018 www.massapicom. 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.