public class LoadEngine extends Object
Constructor and Description |
---|
LoadEngine(ObjectifyImpl<?> ofy,
Session session,
com.google.appengine.api.datastore.AsyncDatastoreService ads,
LoadArrangement loadArrangement) |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Starts asychronous fetching of the batch.
|
Result<Map<com.google.appengine.api.datastore.Key,com.google.appengine.api.datastore.Entity>> |
fetch(Set<com.google.appengine.api.datastore.Key> keys)
Fetch the keys from the async datastore using the current transaction context
|
LoadArrangement |
getLoadArrangement() |
Session |
getSession() |
<T> T |
load(com.google.appengine.api.datastore.Entity ent,
LoadContext ctx)
Converts a datastore entity into a typed pojo object
|
<T> Result<T> |
load(Key<T> key)
Gets the result, possibly from the session, putting it in the session if necessary.
|
<T> Ref<T> |
makeRef(Key<?> rootEntity,
LoadConditions loadConditions,
Key<T> key)
Create a Ref for the key, and maybe start a load operation depending on current load groups.
|
boolean |
shouldLoad(LoadConditions loadConditions) |
void |
stuff(com.google.appengine.api.datastore.Entity ent)
Stuffs an Entity into a place where values in the round can be obtained instead of going to the datastore.
|
Result<Map<Key<?>,Object>> |
translate(Result<Map<com.google.appengine.api.datastore.Key,com.google.appengine.api.datastore.Entity>> raw)
Asynchronously translate raw to processed; might produce successive load operations as refs are filled in
|
public LoadEngine(ObjectifyImpl<?> ofy, Session session, com.google.appengine.api.datastore.AsyncDatastoreService ads, LoadArrangement loadArrangement)
public <T> Result<T> load(Key<T> key)
NullPointerException
- if key is nullpublic void execute()
public <T> Ref<T> makeRef(Key<?> rootEntity, LoadConditions loadConditions, Key<T> key)
rootEntity
- is the entity key which holds this property (possibly through some level of embedded objects)public boolean shouldLoad(LoadConditions loadConditions)
public void stuff(com.google.appengine.api.datastore.Entity ent)
public Result<Map<Key<?>,Object>> translate(Result<Map<com.google.appengine.api.datastore.Key,com.google.appengine.api.datastore.Entity>> raw)
public Result<Map<com.google.appengine.api.datastore.Key,com.google.appengine.api.datastore.Entity>> fetch(Set<com.google.appengine.api.datastore.Key> keys)
public <T> T load(com.google.appengine.api.datastore.Entity ent, LoadContext ctx)
public Session getSession()
public LoadArrangement getLoadArrangement()
Copyright © 2016. All rights reserved.