Concrete CallbackContext implementation that is specific to intercepted queries. Methods
annotated with PreQuery that receive instances of this class may modify the Query
returned by calling #getCurrentElement(). This is an effective way to modify queries
prior to execution.
[[["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\u003ePreQueryContext\u003c/code\u003e is a concrete implementation of \u003ccode\u003eCallbackContext\u003c/code\u003e specifically for intercepted queries.\u003c/p\u003e\n"],["\u003cp\u003eMethods marked with \u003ccode\u003ePreQuery\u003c/code\u003e that receive \u003ccode\u003ePreQueryContext\u003c/code\u003e can modify the \u003ccode\u003eQuery\u003c/code\u003e before it is executed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetCurrentElement()\u003c/code\u003e method can be called to obtain and modify the \u003ccode\u003eQuery\u003c/code\u003e instance within \u003ccode\u003ePreQueryContext\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePreQueryContext\u003c/code\u003e inherits from \u003ccode\u003eBaseCallbackContext\u003c/code\u003e and ultimately \u003ccode\u003ejava.lang.Object\u003c/code\u003e, inheriting various methods from each.\u003c/p\u003e\n"]]],[],null,["# Class PreQueryContext (2.0.0)\n\n public final class PreQueryContext extends BaseCallbackContext\u003cQuery\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 queries. Methods\nannotated with [PreQuery](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PreQuery) that receive instances of this class may modify the [Query](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Query)\nreturned by calling #getCurrentElement(). This is an effective way to modify queries\nprior to execution. \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 PreQueryContext \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-)"]]