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

com.googlecode.objectify.util.ObjectifyWrapper Maven / Gradle / Ivy

Go to download

*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore

The newest version!
/*
 * $Id$
 */

package com.googlecode.objectify.util;

import java.util.Map;

import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.Transaction;
import com.googlecode.objectify.AsyncObjectify;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.NotFoundException;
import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.ObjectifyFactory;
import com.googlecode.objectify.Query;


/**
 * 

Simple wrapper/decorator for an Objectify interface.

* * @author Jeff Schnitzer */ public class ObjectifyWrapper implements Objectify { /** */ private Objectify base; /** Wraps the */ public ObjectifyWrapper(Objectify ofy) { this.base = ofy; } @Override public Map, T> get(Iterable> keys) { return this.base.get(keys); } @Override public Map, T> get(Key... keys) { return this.base.get(keys); } @Override public T get(Key key) throws NotFoundException { return this.base.get(key); } @Override public T get(Class clazz, long id) throws NotFoundException { return this.base.get(clazz, id); } @Override public T get(Class clazz, String name) throws NotFoundException { return this.base.get(clazz, name); } @Override public Map get(Class clazz, Iterable idsOrNames) { return this.base.get(clazz, idsOrNames); } @Override public Map get(Class clazz, S... idsOrNames) { return this.base.get(clazz, idsOrNames); } @Override public T find(Key key) { return this.base.find(key); } @Override public T find(Class clazz, long id) { return this.base.find(clazz, id); } @Override public T find(Class clazz, String name) { return this.base.find(clazz, name); } @Override public Key put(T obj) { return this.base.put(obj); } @Override public Map, T> put(Iterable objs) { return this.base.put(objs); } @Override public Map, T> put(T... objs) { return this.base.put(objs); } @Override public void delete(Object... keysOrEntities) { this.base.delete(keysOrEntities); } @Override public void delete(Iterable keysOrEntities) { this.base.delete(keysOrEntities); } @Override public void delete(Class clazz, long id) { this.base.delete(clazz, id); } @Override public void delete(Class clazz, String name) { this.base.delete(clazz, name); } @Override public Query query() { return this.base.query(); } @Override public Query query(Class clazz) { return this.base.query(clazz); } @Override public Transaction getTxn() { return this.base.getTxn(); } @Override public ObjectifyFactory getFactory() { return this.base.getFactory(); } @Override public AsyncObjectify async() { return this.base.async(); } @Override public DatastoreService getDatastore() { return this.base.getDatastore(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy