Merge "Migrate reviewed flags to local H2 database"

This commit is contained in:
Edwin Kempin
2016-06-27 14:27:10 +00:00
committed by Gerrit Code Review
15 changed files with 386 additions and 192 deletions

View File

@@ -1,37 +0,0 @@
// Copyright (C) 2009 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.reviewdb.server;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.AccountPatchReview;
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gwtorm.server.Access;
import com.google.gwtorm.server.OrmException;
import com.google.gwtorm.server.PrimaryKey;
import com.google.gwtorm.server.Query;
import com.google.gwtorm.server.ResultSet;
public interface AccountPatchReviewAccess
extends Access<AccountPatchReview, AccountPatchReview.Key> {
@Override
@PrimaryKey("key")
AccountPatchReview get(AccountPatchReview.Key id) throws OrmException;
@Query("WHERE key.accountId = ? AND key.patchKey.patchSetId = ?")
ResultSet<AccountPatchReview> byReviewer(Account.Id who, PatchSet.Id ps) throws OrmException;
@Query("WHERE key.patchKey.patchSetId = ?")
ResultSet<AccountPatchReview> byPatchSet(PatchSet.Id ps) throws OrmException;
}

View File

@@ -74,8 +74,7 @@ public interface ReviewDb extends Schema {
@Relation(id = 19)
AccountProjectWatchAccess accountProjectWatches();
@Relation(id = 20)
AccountPatchReviewAccess accountPatchReviews();
// Deleted @Relation(id = 20)
@Relation(id = 21)
ChangeAccess changes();

View File

@@ -113,11 +113,6 @@ public class ReviewDbWrapper implements ReviewDb {
return delegate.accountProjectWatches();
}
@Override
public AccountPatchReviewAccess accountPatchReviews() {
return delegate.accountPatchReviews();
}
@Override
public ChangeAccess changes() {
return delegate.changes();