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

com.googlecode.objectify.AsyncObjectify 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!
package com.googlecode.objectify;

import java.util.Map;

import com.google.appengine.api.datastore.AsyncDatastoreService;

/**
 * 

Provides asynchronous get/put/delete methods. Behavior is identical to the synchronous * versions of these methods except that exceptions will be thrown when {@code Result.get()} is * called.

* *

Note that there are no {@code query()} methods here. This is because queries are already * inherently asynchronous; you can construct multiple iterators but the datastore will not block * until you call {@code Iterator.hasNext()} or {@code Iterator.next()} for the first time.

* *

You can obtain an instance of this interface by calling {@code Objectify.async()}. See * the javadocs of {@code Objectify} for method-level documentation.

* * @author Jeff Schnitzer */ public interface AsyncObjectify { /** * Get the synchronous version of Objectify. */ Objectify sync(); /** * @see Objectify#get(Iterable) */ Result, T>> get(Iterable> keys); /** * @see Objectify#get(Key...) */ Result, T>> get(Key... keys); /** * Note that the Result.get() method will throw NotFoundException if entity wasn't found * @see Objectify#get(Key) */ Result get(Key key); /** * Note that the Result.get() method will throw NotFoundException if entity wasn't found * @see Objectify#get(Class, long) */ Result get(Class clazz, long id); /** * Note that the Result.get() method will throw NotFoundException if entity wasn't found * @see Objectify#get(Class, String) */ Result get(Class clazz, String name); /** * @see Objectify#get(Class, Iterable) */ Result> get(Class clazz, Iterable idsOrNames); /** * @see Objectify#get(Class, Object...) */ Result> get(Class clazz, S... idsOrNames); /** * @see Objectify#find(Key) */ Result find(Key key); /** * @see Objectify#find(Class, long) */ Result find(Class clazz, long id); /** * @see Objectify#find(Class, String) */ Result find(Class clazz, String name); /** * @see Objectify#put(Object) */ Result> put(T obj); /** * @see Objectify#put(Iterable) */ Result, T>> put(Iterable objs); /** * @see Objectify#put(Object...) */ Result, T>> put(T... objs); /** * @see Objectify#delete(Object...) */ Result delete(Object... keysOrEntities); /** * @see Objectify#delete(Iterable) */ Result delete(Iterable keysOrEntities); /** * @see Objectify#delete(Class, long) */ Result delete(Class clazz, long id); /** * @see Objectify#delete(Class, String) */ Result delete(Class clazz, String name); /** * Get the raw AsyncDatastoreService */ AsyncDatastoreService getAsyncDatastore(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy