Class LoadContext
java.lang.Object
com.googlecode.objectify.impl.translate.LoadContext
The context of a load operation, which may extend across several entities (for example, a batch).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Delays an operation until the context is done().void
done()
Call this when a load process completes.void
enterContainerContext
(Object container) Enter a container context; this is the context of the object that we are processing right now.void
exitContainerContext
(Object expectedContainer) Exit a container context.getContainer
(Type containerType, Path path) Get the container object which is appropriate for the specified property.<T> Ref<T>
loadRef
(Key<T> key, LoadConditions loadConditions) Create a Ref for the key, and maybe start a load operation depending on current load groups.void
void
setCurrentRoot
(Key<?> rootEntity) Sets the current root entityThe most recently recycled value.
-
Constructor Details
-
LoadContext
-
-
Method Details
-
useRecycled
The most recently recycled value. It can be used exactly once. -
recycle
-
setCurrentRoot
Sets the current root entity -
done
public void done()Call this when a load process completes. Executes anything in the batch and then executes any delayed operations. -
loadRef
Create a Ref for the key, and maybe start a load operation depending on current load groups. -
defer
Delays an operation until the context is done(). Typically this is for lifecycle methods. -
getContainer
Get the container object which is appropriate for the specified property. Go up the chain looking for a compatible type; the first one found is the container. If nothing found, throw an exception. -
enterContainerContext
Enter a container context; this is the context of the object that we are processing right now. -
exitContainerContext
Exit a container context. The parameter is just a sanity check to make sure that the value popped off is the same as the value we expect.
-