All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gerrit.reviewdb.server.ReviewDbWrapper Maven / Gradle / Ivy

There is a newer version: 3.10.0-rc4
Show newest version
// Copyright (C) 2016 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 static java.util.Objects.requireNonNull;

import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.reviewdb.client.AccountGroupById;
import com.google.gerrit.reviewdb.client.AccountGroupByIdAud;
import com.google.gerrit.reviewdb.client.AccountGroupMember;
import com.google.gerrit.reviewdb.client.AccountGroupMemberAudit;
import com.google.gerrit.reviewdb.client.AccountGroupName;
import com.google.gerrit.reviewdb.client.Change;
import com.google.gerrit.reviewdb.client.ChangeMessage;
import com.google.gerrit.reviewdb.client.PatchLineComment;
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gerrit.reviewdb.client.PatchSetApproval;
import com.google.gwtorm.jdbc.JdbcSchema;
import com.google.gwtorm.server.Access;
import com.google.gwtorm.server.AtomicUpdate;
import com.google.gwtorm.server.OrmException;
import com.google.gwtorm.server.ResultSet;
import com.google.gwtorm.server.StatementExecutor;
import java.util.Map;

public class ReviewDbWrapper implements ReviewDb {
  public static JdbcSchema unwrapJbdcSchema(ReviewDb db) {
    if (db instanceof ReviewDbWrapper) {
      return unwrapJbdcSchema(((ReviewDbWrapper) db).unsafeGetDelegate());
    }
    return (JdbcSchema) db;
  }

  protected final ReviewDb delegate;

  private boolean inTransaction;

  protected ReviewDbWrapper(ReviewDb delegate) {
    this.delegate = requireNonNull(delegate);
  }

  public ReviewDb unsafeGetDelegate() {
    return delegate;
  }

  public boolean inTransaction() {
    return inTransaction;
  }

  public void beginTransaction() {
    inTransaction = true;
  }

  @Override
  public void commit() throws OrmException {
    if (!inTransaction) {
      // This reads a little weird, we're not in a transaction, so why are we calling commit?
      // Because we want to let the underlying ReviewDb do its normal thing in this case (which may
      // be throwing an exception, or not, depending on implementation).
      delegate.commit();
    }
  }

  @Override
  public void rollback() throws OrmException {
    if (inTransaction) {
      inTransaction = false;
    } else {
      // See comment in commit(): we want to let the underlying ReviewDb do its thing.
      delegate.rollback();
    }
  }

  @Override
  public void updateSchema(StatementExecutor e) throws OrmException {
    delegate.updateSchema(e);
  }

  @Override
  public void pruneSchema(StatementExecutor e) throws OrmException {
    delegate.pruneSchema(e);
  }

  @Override
  public Access[] allRelations() {
    return delegate.allRelations();
  }

  @Override
  public void close() {
    delegate.close();
  }

  @Override
  public SchemaVersionAccess schemaVersion() {
    return delegate.schemaVersion();
  }

  @Override
  public SystemConfigAccess systemConfig() {
    return delegate.systemConfig();
  }

  @Override
  public ChangeAccess changes() {
    return delegate.changes();
  }

  @Override
  public PatchSetApprovalAccess patchSetApprovals() {
    return delegate.patchSetApprovals();
  }

  @Override
  public ChangeMessageAccess changeMessages() {
    return delegate.changeMessages();
  }

  @Override
  public PatchSetAccess patchSets() {
    return delegate.patchSets();
  }

  @Override
  public PatchLineCommentAccess patchComments() {
    return delegate.patchComments();
  }

  @Override
  @SuppressWarnings("deprecation")
  public int nextAccountId() throws OrmException {
    return delegate.nextAccountId();
  }

  @Override
  @SuppressWarnings("deprecation")
  public int nextAccountGroupId() throws OrmException {
    return delegate.nextAccountGroupId();
  }

  @Override
  @SuppressWarnings("deprecation")
  public int nextChangeId() throws OrmException {
    return delegate.nextChangeId();
  }

  public static class ChangeAccessWrapper implements ChangeAccess {
    protected final ChangeAccess delegate;

    protected ChangeAccessWrapper(ChangeAccess delegate) {
      this.delegate = requireNonNull(delegate);
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public Change.Id primaryKey(Change entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        Change.Id key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys) throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(Change.Id key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public Change atomicUpdate(Change.Id key, AtomicUpdate update) throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public Change get(Change.Id id) throws OrmException {
      return delegate.get(id);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class PatchSetApprovalAccessWrapper implements PatchSetApprovalAccess {
    protected final PatchSetApprovalAccess delegate;

    protected PatchSetApprovalAccessWrapper(PatchSetApprovalAccess delegate) {
      this.delegate = delegate;
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public PatchSetApproval.Key primaryKey(PatchSetApproval entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        PatchSetApproval.Key key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys)
        throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(PatchSetApproval.Key key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public PatchSetApproval atomicUpdate(
        PatchSetApproval.Key key, AtomicUpdate update) throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public PatchSetApproval get(PatchSetApproval.Key key) throws OrmException {
      return delegate.get(key);
    }

    @Override
    public ResultSet byChange(Change.Id id) throws OrmException {
      return delegate.byChange(id);
    }

    @Override
    public ResultSet byPatchSet(PatchSet.Id id) throws OrmException {
      return delegate.byPatchSet(id);
    }

    @Override
    public ResultSet byPatchSetUser(PatchSet.Id patchSet, Account.Id account)
        throws OrmException {
      return delegate.byPatchSetUser(patchSet, account);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class ChangeMessageAccessWrapper implements ChangeMessageAccess {
    protected final ChangeMessageAccess delegate;

    protected ChangeMessageAccessWrapper(ChangeMessageAccess delegate) {
      this.delegate = delegate;
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public ChangeMessage.Key primaryKey(ChangeMessage entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        ChangeMessage.Key key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys) throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(ChangeMessage.Key key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public ChangeMessage atomicUpdate(ChangeMessage.Key key, AtomicUpdate update)
        throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public ChangeMessage get(ChangeMessage.Key id) throws OrmException {
      return delegate.get(id);
    }

    @Override
    public ResultSet byChange(Change.Id id) throws OrmException {
      return delegate.byChange(id);
    }

    @Override
    public ResultSet byPatchSet(PatchSet.Id id) throws OrmException {
      return delegate.byPatchSet(id);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class PatchSetAccessWrapper implements PatchSetAccess {
    protected final PatchSetAccess delegate;

    protected PatchSetAccessWrapper(PatchSetAccess delegate) {
      this.delegate = delegate;
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public PatchSet.Id primaryKey(PatchSet entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        PatchSet.Id key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys) throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(PatchSet.Id key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public PatchSet atomicUpdate(PatchSet.Id key, AtomicUpdate update)
        throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public PatchSet get(PatchSet.Id id) throws OrmException {
      return delegate.get(id);
    }

    @Override
    public ResultSet byChange(Change.Id id) throws OrmException {
      return delegate.byChange(id);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class PatchLineCommentAccessWrapper implements PatchLineCommentAccess {
    protected PatchLineCommentAccess delegate;

    protected PatchLineCommentAccessWrapper(PatchLineCommentAccess delegate) {
      this.delegate = delegate;
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public PatchLineComment.Key primaryKey(PatchLineComment entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        PatchLineComment.Key key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys)
        throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(PatchLineComment.Key key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public PatchLineComment atomicUpdate(
        PatchLineComment.Key key, AtomicUpdate update) throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public PatchLineComment get(PatchLineComment.Key id) throws OrmException {
      return delegate.get(id);
    }

    @Override
    public ResultSet byChange(Change.Id id) throws OrmException {
      return delegate.byChange(id);
    }

    @Override
    public ResultSet byPatchSet(PatchSet.Id id) throws OrmException {
      return delegate.byPatchSet(id);
    }

    @Override
    public ResultSet publishedByChangeFile(Change.Id id, String file)
        throws OrmException {
      return delegate.publishedByChangeFile(id, file);
    }

    @Override
    public ResultSet publishedByPatchSet(PatchSet.Id patchset)
        throws OrmException {
      return delegate.publishedByPatchSet(patchset);
    }

    @Override
    public ResultSet draftByPatchSetAuthor(
        PatchSet.Id patchset, Account.Id author) throws OrmException {
      return delegate.draftByPatchSetAuthor(patchset, author);
    }

    @Override
    public ResultSet draftByChangeFileAuthor(
        Change.Id id, String file, Account.Id author) throws OrmException {
      return delegate.draftByChangeFileAuthor(id, file, author);
    }

    @Override
    public ResultSet draftByAuthor(Account.Id author) throws OrmException {
      return delegate.draftByAuthor(author);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class AccountGroupAccessWrapper implements AccountGroupAccess {
    protected final AccountGroupAccess delegate;

    protected AccountGroupAccessWrapper(AccountGroupAccess delegate) {
      this.delegate = requireNonNull(delegate);
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public AccountGroup.Id primaryKey(AccountGroup entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        AccountGroup.Id key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys) throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(AccountGroup.Id key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public AccountGroup atomicUpdate(AccountGroup.Id key, AtomicUpdate update)
        throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public AccountGroup get(AccountGroup.Id id) throws OrmException {
      return delegate.get(id);
    }

    @Override
    public ResultSet byUUID(AccountGroup.UUID uuid) throws OrmException {
      return delegate.byUUID(uuid);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class AccountGroupNameAccessWrapper implements AccountGroupNameAccess {
    protected final AccountGroupNameAccess delegate;

    protected AccountGroupNameAccessWrapper(AccountGroupNameAccess delegate) {
      this.delegate = requireNonNull(delegate);
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public AccountGroup.NameKey primaryKey(AccountGroupName entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        AccountGroup.NameKey key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys)
        throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(AccountGroup.NameKey key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public AccountGroupName atomicUpdate(
        AccountGroup.NameKey key, AtomicUpdate update) throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public AccountGroupName get(AccountGroup.NameKey name) throws OrmException {
      return delegate.get(name);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class AccountGroupMemberAccessWrapper implements AccountGroupMemberAccess {
    protected final AccountGroupMemberAccess delegate;

    protected AccountGroupMemberAccessWrapper(AccountGroupMemberAccess delegate) {
      this.delegate = requireNonNull(delegate);
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public AccountGroupMember.Key primaryKey(AccountGroupMember entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture
        getAsync(AccountGroupMember.Key key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys)
        throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(AccountGroupMember.Key key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public AccountGroupMember atomicUpdate(
        AccountGroupMember.Key key, AtomicUpdate update) throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public AccountGroupMember get(AccountGroupMember.Key key) throws OrmException {
      return delegate.get(key);
    }

    @Override
    public ResultSet byAccount(Account.Id id) throws OrmException {
      return delegate.byAccount(id);
    }

    @Override
    public ResultSet byGroup(AccountGroup.Id id) throws OrmException {
      return delegate.byGroup(id);
    }
  }

  public static class AccountGroupMemberAuditAccessWrapper
      implements AccountGroupMemberAuditAccess {
    protected final AccountGroupMemberAuditAccess delegate;

    protected AccountGroupMemberAuditAccessWrapper(AccountGroupMemberAuditAccess delegate) {
      this.delegate = requireNonNull(delegate);
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public AccountGroupMemberAudit.Key primaryKey(AccountGroupMemberAudit entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(
        Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture
        getAsync(AccountGroupMemberAudit.Key key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys)
        throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(AccountGroupMemberAudit.Key key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public AccountGroupMemberAudit atomicUpdate(
        AccountGroupMemberAudit.Key key, AtomicUpdate update)
        throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public AccountGroupMemberAudit get(AccountGroupMemberAudit.Key key) throws OrmException {
      return delegate.get(key);
    }

    @Override
    public ResultSet byGroupAccount(
        AccountGroup.Id groupId, Account.Id accountId) throws OrmException {
      return delegate.byGroupAccount(groupId, accountId);
    }

    @Override
    public ResultSet byGroup(AccountGroup.Id groupId) throws OrmException {
      return delegate.byGroup(groupId);
    }
  }

  public static class AccountGroupByIdAccessWrapper implements AccountGroupByIdAccess {
    protected final AccountGroupByIdAccess delegate;

    protected AccountGroupByIdAccessWrapper(AccountGroupByIdAccess delegate) {
      this.delegate = requireNonNull(delegate);
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public AccountGroupById.Key primaryKey(AccountGroupById entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture getAsync(
        AccountGroupById.Key key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys)
        throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(AccountGroupById.Key key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public AccountGroupById atomicUpdate(
        AccountGroupById.Key key, AtomicUpdate update) throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public AccountGroupById get(AccountGroupById.Key key) throws OrmException {
      return delegate.get(key);
    }

    @Override
    public ResultSet byIncludeUUID(AccountGroup.UUID uuid) throws OrmException {
      return delegate.byIncludeUUID(uuid);
    }

    @Override
    public ResultSet byGroup(AccountGroup.Id id) throws OrmException {
      return delegate.byGroup(id);
    }

    @Override
    public ResultSet all() throws OrmException {
      return delegate.all();
    }
  }

  public static class AccountGroupByIdAudAccessWrapper implements AccountGroupByIdAudAccess {
    protected final AccountGroupByIdAudAccess delegate;

    protected AccountGroupByIdAudAccessWrapper(AccountGroupByIdAudAccess delegate) {
      this.delegate = requireNonNull(delegate);
    }

    @Override
    public String getRelationName() {
      return delegate.getRelationName();
    }

    @Override
    public int getRelationID() {
      return delegate.getRelationID();
    }

    @Override
    public ResultSet iterateAllEntities() throws OrmException {
      return delegate.iterateAllEntities();
    }

    @Override
    public AccountGroupByIdAud.Key primaryKey(AccountGroupByIdAud entity) {
      return delegate.primaryKey(entity);
    }

    @Override
    public Map toMap(
        Iterable c) {
      return delegate.toMap(c);
    }

    @SuppressWarnings("deprecation")
    @Override
    public com.google.common.util.concurrent.CheckedFuture
        getAsync(AccountGroupByIdAud.Key key) {
      return delegate.getAsync(key);
    }

    @Override
    public ResultSet get(Iterable keys)
        throws OrmException {
      return delegate.get(keys);
    }

    @Override
    public void insert(Iterable instances) throws OrmException {
      delegate.insert(instances);
    }

    @Override
    public void update(Iterable instances) throws OrmException {
      delegate.update(instances);
    }

    @Override
    public void upsert(Iterable instances) throws OrmException {
      delegate.upsert(instances);
    }

    @Override
    public void deleteKeys(Iterable keys) throws OrmException {
      delegate.deleteKeys(keys);
    }

    @Override
    public void delete(Iterable instances) throws OrmException {
      delegate.delete(instances);
    }

    @Override
    public void beginTransaction(AccountGroupByIdAud.Key key) throws OrmException {
      delegate.beginTransaction(key);
    }

    @Override
    public AccountGroupByIdAud atomicUpdate(
        AccountGroupByIdAud.Key key, AtomicUpdate update) throws OrmException {
      return delegate.atomicUpdate(key, update);
    }

    @Override
    public AccountGroupByIdAud get(AccountGroupByIdAud.Key key) throws OrmException {
      return delegate.get(key);
    }

    @Override
    public ResultSet byGroupInclude(
        AccountGroup.Id groupId, AccountGroup.UUID incGroupUUID) throws OrmException {
      return delegate.byGroupInclude(groupId, incGroupUUID);
    }

    @Override
    public ResultSet byGroup(AccountGroup.Id groupId) throws OrmException {
      return delegate.byGroup(groupId);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy