PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/com/google/appengine/datanucleus/BaseDatastoreServiceDelegate.java

http://datanucleus-appengine.googlecode.com/
Java | 140 lines | 93 code | 29 blank | 18 comment | 0 complexity | 23e5960a5a3c66f897462ccdc22a1c72 MD5 | raw file
  1/**********************************************************************
  2Copyright (c) 2009 Google Inc.
  3
  4Licensed under the Apache License, Version 2.0 (the "License");
  5you may not use this file except in compliance with the License.
  6You may obtain a copy of the License at
  7
  8http://www.apache.org/licenses/LICENSE-2.0
  9
 10Unless required by applicable law or agreed to in writing, software
 11distributed under the License is distributed on an "AS IS" BASIS,
 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13See the License for the specific language governing permissions and
 14limitations under the License.
 15**********************************************************************/
 16package com.google.appengine.datanucleus;
 17
 18import com.google.appengine.api.datastore.DatastoreAttributes;
 19import com.google.appengine.api.datastore.DatastoreService;
 20import com.google.appengine.api.datastore.Entity;
 21import com.google.appengine.api.datastore.EntityNotFoundException;
 22import com.google.appengine.api.datastore.Index;
 23import com.google.appengine.api.datastore.Key;
 24import com.google.appengine.api.datastore.KeyRange;
 25import com.google.appengine.api.datastore.PreparedQuery;
 26import com.google.appengine.api.datastore.Query;
 27import com.google.appengine.api.datastore.Transaction;
 28import com.google.appengine.api.datastore.TransactionOptions;
 29
 30import java.util.Collection;
 31import java.util.List;
 32import java.util.Map;
 33
 34/**
 35 * @author Max Ross <maxr@google.com>
 36 */
 37public class BaseDatastoreServiceDelegate implements DatastoreService {
 38
 39  private final DatastoreService delegate;
 40
 41  public BaseDatastoreServiceDelegate(DatastoreService delegate) {
 42    this.delegate = delegate;
 43  }
 44
 45  public Entity get(Key key) throws EntityNotFoundException {
 46    return delegate.get(key);
 47  }
 48
 49  public Entity get(Transaction transaction, Key key) throws EntityNotFoundException {
 50    return delegate.get(transaction, key);
 51  }
 52
 53  public Map<Key, Entity> get(Iterable<Key> keyIterable) {
 54    return delegate.get(keyIterable);
 55  }
 56
 57  public Map<Key, Entity> get(Transaction transaction, Iterable<Key> keyIterable) {
 58    return delegate.get(transaction, keyIterable);
 59  }
 60
 61  public Key put(Entity entity) {
 62    return delegate.put(entity);
 63  }
 64
 65  public Key put(Transaction transaction, Entity entity) {
 66    return delegate.put(transaction, entity);
 67  }
 68
 69  public List<Key> put(Iterable<Entity> entityIterable) {
 70    return delegate.put(entityIterable);
 71  }
 72
 73  public List<Key> put(Transaction transaction, Iterable<Entity> entityIterable) {
 74    return delegate.put(transaction, entityIterable);
 75  }
 76
 77  public void delete(Key... keys) {
 78    delegate.delete(keys);
 79  }
 80
 81  public void delete(Transaction transaction, Key... keys) {
 82    delegate.delete(transaction, keys);
 83  }
 84
 85  public void delete(Iterable<Key> keyIterable) {
 86    delegate.delete(keyIterable);
 87  }
 88
 89  public void delete(Transaction transaction, Iterable<Key> keyIterable) {
 90    delegate.delete(transaction, keyIterable);
 91  }
 92
 93  public PreparedQuery prepare(Query query) {
 94    return delegate.prepare(query);
 95  }
 96
 97  public PreparedQuery prepare(Transaction transaction, Query query) {
 98    return delegate.prepare(transaction, query);
 99  }
100
101  public Transaction beginTransaction() {
102    return delegate.beginTransaction();
103  }
104
105  public Transaction beginTransaction(TransactionOptions txnOpts) {
106    return delegate.beginTransaction(txnOpts);
107  }
108
109  public Transaction getCurrentTransaction() {
110    return delegate.getCurrentTransaction();
111  }
112
113  public Transaction getCurrentTransaction(Transaction transaction) {
114    return delegate.getCurrentTransaction(transaction);
115  }
116
117  public Collection<Transaction> getActiveTransactions() {
118    return delegate.getActiveTransactions();
119  }
120
121  public KeyRange allocateIds(String s, long l) {
122    return delegate.allocateIds(s, l);
123  }
124
125  public KeyRange allocateIds(Key key, String s, long l) {
126    return delegate.allocateIds(key, s, l);
127  }
128
129  public KeyRangeState allocateIdRange(KeyRange keyRange) {
130    return delegate.allocateIdRange(keyRange);
131  }
132
133  public DatastoreAttributes getDatastoreAttributes() {
134    return delegate.getDatastoreAttributes();
135  }
136
137  public Map<Index, Index.IndexState> getIndexes() {
138    return delegate.getIndexes();
139  }
140}