|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.objectify.impl.AsyncObjectifyImpl
public class AsyncObjectifyImpl
Implementation of the Objectify interface. Note we *always* use the AsyncDatastoreService methods that use transactions to avoid the confusion of implicit transactions.
Field Summary | |
---|---|
protected com.google.appengine.api.datastore.AsyncDatastoreService |
ads
The google object that does the actual heavy lifting |
protected ObjectifyFactory |
factory
The factory that produced us |
protected Objectify |
sync
The synchronous version of this API; gets initialized by ObjectifyImpl's constructor |
protected com.google.appengine.api.datastore.Transaction |
txn
The transaction to use. |
Constructor Summary | |
---|---|
AsyncObjectifyImpl(ObjectifyFactory fact,
com.google.appengine.api.datastore.AsyncDatastoreService ds,
com.google.appengine.api.datastore.Transaction txn)
Protected constructor creates a wrapper on the datastore with the specified txn. |
Method Summary | ||
---|---|---|
|
delete(java.lang.Class<T> clazz,
long id)
|
|
|
delete(java.lang.Class<T> clazz,
java.lang.String name)
|
|
Result<java.lang.Void> |
delete(java.lang.Iterable<?> keysOrEntities)
|
|
Result<java.lang.Void> |
delete(java.lang.Object... keysOrEntities)
|
|
|
find(java.lang.Class<? extends T> clazz,
long id)
|
|
|
find(java.lang.Class<? extends T> clazz,
java.lang.String name)
|
|
|
find(Key<? extends T> key)
|
|
|
get(java.lang.Class<? extends T> clazz,
java.lang.Iterable<S> ids)
|
|
|
get(java.lang.Class<? extends T> clazz,
long id)
Note that the Result.get() method will throw NotFoundException if entity wasn't found |
|
|
get(java.lang.Class<? extends T> clazz,
S... idsOrNames)
|
|
|
get(java.lang.Class<? extends T> clazz,
java.lang.String name)
Note that the Result.get() method will throw NotFoundException if entity wasn't found |
|
|
get(java.lang.Iterable<? extends Key<? extends T>> keys)
|
|
|
get(Key<? extends T>... keys)
|
|
|
get(Key<? extends T> key)
Note that the Result.get() method will throw NotFoundException if entity wasn't found |
|
com.google.appengine.api.datastore.AsyncDatastoreService |
getAsyncDatastore()
Get the raw AsyncDatastoreService |
|
ObjectifyFactory |
getFactory()
Not currently part of the AsyncObjectify api, but the actual logic lives here. |
|
com.google.appengine.api.datastore.Transaction |
getTxn()
Not currently part of the AsyncObjectify api, but the actual logic lives here. |
|
|
put(java.lang.Iterable<? extends T> objs)
|
|
|
put(T... objs)
|
|
|
put(T obj)
|
|
|
query()
Not currently part of the AsyncObjectify api, but the actual logic lives here. |
|
|
query(java.lang.Class<T> clazz)
Not currently part of the AsyncObjectify api, but the actual logic lives here. |
|
Objectify |
sync()
Get the synchronous version of Objectify. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ObjectifyFactory factory
protected com.google.appengine.api.datastore.AsyncDatastoreService ads
protected com.google.appengine.api.datastore.Transaction txn
protected Objectify sync
Constructor Detail |
---|
public AsyncObjectifyImpl(ObjectifyFactory fact, com.google.appengine.api.datastore.AsyncDatastoreService ds, com.google.appengine.api.datastore.Transaction txn)
txn
- can be null to not use transactions.Method Detail |
---|
public <T> Result<java.util.Map<Key<T>,T>> get(java.lang.Iterable<? extends Key<? extends T>> keys)
get
in interface AsyncObjectify
Objectify.get(Iterable)
public <T> Result<java.util.Map<Key<T>,T>> get(Key<? extends T>... keys)
get
in interface AsyncObjectify
Objectify.get(Key...)
public <T> Result<T> get(Key<? extends T> key)
AsyncObjectify
get
in interface AsyncObjectify
Objectify.get(Key)
public <T> Result<T> get(java.lang.Class<? extends T> clazz, long id)
AsyncObjectify
get
in interface AsyncObjectify
Objectify.get(Class, long)
public <T> Result<T> get(java.lang.Class<? extends T> clazz, java.lang.String name)
AsyncObjectify
get
in interface AsyncObjectify
Objectify.get(Class, String)
public <S,T> Result<java.util.Map<S,T>> get(java.lang.Class<? extends T> clazz, java.lang.Iterable<S> ids)
get
in interface AsyncObjectify
Objectify.get(Class, Iterable)
public <S,T> Result<java.util.Map<S,T>> get(java.lang.Class<? extends T> clazz, S... idsOrNames)
get
in interface AsyncObjectify
Objectify.get(Class, Object...)
public <T> Result<T> find(Key<? extends T> key)
find
in interface AsyncObjectify
Objectify.find(Key)
public <T> Result<T> find(java.lang.Class<? extends T> clazz, long id)
find
in interface AsyncObjectify
Objectify.find(Class, long)
public <T> Result<T> find(java.lang.Class<? extends T> clazz, java.lang.String name)
find
in interface AsyncObjectify
Objectify.find(Class, String)
public <T> Result<Key<T>> put(T obj)
put
in interface AsyncObjectify
Objectify.put(Object)
public <T> Result<java.util.Map<Key<T>,T>> put(java.lang.Iterable<? extends T> objs)
put
in interface AsyncObjectify
Objectify.put(Iterable)
public <T> Result<java.util.Map<Key<T>,T>> put(T... objs)
put
in interface AsyncObjectify
Objectify.put(Object...)
public Result<java.lang.Void> delete(java.lang.Object... keysOrEntities)
delete
in interface AsyncObjectify
Objectify.delete(Object...)
public <T> Result<java.lang.Void> delete(java.lang.Class<T> clazz, long id)
delete
in interface AsyncObjectify
Objectify.delete(Class, long)
public <T> Result<java.lang.Void> delete(java.lang.Class<T> clazz, java.lang.String name)
delete
in interface AsyncObjectify
Objectify.delete(Class, String)
public Result<java.lang.Void> delete(java.lang.Iterable<?> keysOrEntities)
delete
in interface AsyncObjectify
Objectify.delete(Iterable)
public <T> Query<T> query()
public <T> Query<T> query(java.lang.Class<T> clazz)
public com.google.appengine.api.datastore.Transaction getTxn()
public com.google.appengine.api.datastore.AsyncDatastoreService getAsyncDatastore()
AsyncObjectify
getAsyncDatastore
in interface AsyncObjectify
public ObjectifyFactory getFactory()
public Objectify sync()
AsyncObjectify
sync
in interface AsyncObjectify
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |