Concrete CallbackContext implementation that is specific to intercepted operations that
load Entities, currently get and "query". It is important to note that when a
PostLoadContext is provided to a callback following a get operation, #getElements()
returns all retrieved Entities. However, when a PostLoadContext is provided to a callback
following a query, a separate PostLoadContext will be constructed for each Entity in the result
set so #getElements() will only return a List containing a single Entity. This is
due to the streaming nature of query responses.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003ePostLoadContext\u003c/code\u003e is a specific implementation of \u003ccode\u003eCallbackContext\u003c/code\u003e for operations that load \u003ccode\u003eEntities\u003c/code\u003e, such as get and query.\u003c/p\u003e\n"],["\u003cp\u003eWhen used after a get operation, \u003ccode\u003egetElements()\u003c/code\u003e in \u003ccode\u003ePostLoadContext\u003c/code\u003e returns all retrieved \u003ccode\u003eEntities\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAfter a query operation, \u003ccode\u003ePostLoadContext\u003c/code\u003e is created per \u003ccode\u003eEntity\u003c/code\u003e, with \u003ccode\u003egetElements()\u003c/code\u003e returning a list containing a single \u003ccode\u003eEntity\u003c/code\u003e due to the streaming nature of query responses.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePostLoadContext\u003c/code\u003e inherits methods such as \u003ccode\u003egetCurrentElement()\u003c/code\u003e, \u003ccode\u003egetCurrentIndex()\u003c/code\u003e, \u003ccode\u003egetCurrentTransaction()\u003c/code\u003e and \u003ccode\u003egetElements()\u003c/code\u003e from \u003ccode\u003eBaseCallbackContext\u003c/code\u003e and other methods from \u003ccode\u003ejava.lang.Object\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class PostLoadContext (2.0.0)\n\n public final class PostLoadContext extends BaseCallbackContext\u003cEntity\u003e\n\nConcrete [CallbackContext](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.CallbackContext) implementation that is specific to intercepted operations that\nload [Entities](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entity), currently get and \"query\". It is important to note that when a\nPostLoadContext is provided to a callback following a get operation, #getElements()\nreturns all retrieved Entities. However, when a PostLoadContext is provided to a callback\nfollowing a query, a separate PostLoadContext will be constructed for each Entity in the result\nset so #getElements() will only return a [List](https://docs.oracle.com/javase/8/docs/api/java/util/List.html) containing a single Entity. This is\ndue to the streaming nature of query responses. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e com.google.appengine.api.datastore.BaseCallbackContext \\\u003e PostLoadContext \n\nInherited Members\n-----------------\n\ncom.google.appengine.api.datastore.BaseCallbackContext.getCurrentElement() \ncom.google.appengine.api.datastore.BaseCallbackContext.getCurrentIndex() \ncom.google.appengine.api.datastore.BaseCallbackContext.getCurrentTransaction() \ncom.google.appengine.api.datastore.BaseCallbackContext.getElements() \ncom.google.appengine.api.datastore.BaseCallbackContext.toString() \n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)"]]