Processes datastore callback annotations (
PrePut, PostPut, PreDelete, PostDelete,
PreGet, com.google.appengine.api.datastore.PostLoad, PreQuery) and
generates a config file that the Datastore API can load at runtime. Each
line of the config file is of the format:
kind.callback_type=comma-separated list of methods
where 'kind' is the kind of the entity to which the config on that line
applies, 'callback_type' is one of PrePut, PostPut, PreDelete, PostDelete,
and each entry in the comma-separated list of methods is a colon-delimited
fully-qualified classname:method name tuple. So for example, if the dev
wants a method named 'prePutCallback1' belonging to class
'com.example.MyCallbacks and a method named 'prePutCallback2'
belonging to the same class to be invoked before any entity of kind 'yar' is
put, the config file will look like this:
Each type of callback has its own signature requirements for the methods it
annotates. If any of these signature requirements are violated the processor
will produce an error. See the javadoc for the annotations for more
information about the callback-specific signature requirements.
[[["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-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDatastoreCallbacksProcessor\u003c/code\u003e handles annotations for datastore callbacks like \u003ccode\u003ePrePut\u003c/code\u003e, \u003ccode\u003ePostPut\u003c/code\u003e, \u003ccode\u003ePreDelete\u003c/code\u003e, \u003ccode\u003ePostDelete\u003c/code\u003e, \u003ccode\u003ePreGet\u003c/code\u003e, \u003ccode\u003ePostLoad\u003c/code\u003e, and \u003ccode\u003ePreQuery\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt generates a configuration file that the Datastore API uses at runtime to determine which methods to invoke for each type of callback and entity kind.\u003c/p\u003e\n"],["\u003cp\u003eThe config file specifies callback methods for specific entity kinds or all kinds, using a format like \u003ccode\u003ekind.callback_type=comma-separated list of methods\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach callback type requires specific method signatures, and the processor will flag errors if these are not followed.\u003c/p\u003e\n"],["\u003cp\u003eThe processor can be run with a debug option that enables detailed logging statements.\u003c/p\u003e\n"]]],[],null,["# Package com.google.appengine.tools.compilation (2.0.0)\n\nClasses\n-------\n\n### [DatastoreCallbacksProcessor](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.tools.compilation.DatastoreCallbacksProcessor)\n\nProcesses datastore callback annotations (\n[PrePut](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PrePut), [PostPut](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PostPut), [PreDelete](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PreDelete), [PostDelete](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PostDelete),\n[PreGet](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PreGet), [com.google.appengine.api.datastore.PostLoad](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PostLoad), [PreQuery](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PreQuery)) and\ngenerates a config file that the Datastore API can load at runtime. Each\nline of the config file is of the format: \n\nkind.callback_type=comma-separated list of methods \n\nwhere 'kind' is the kind of the entity to which the config on that line\napplies, 'callback_type' is one of PrePut, PostPut, PreDelete, PostDelete,\nand each entry in the comma-separated list of methods is a colon-delimited\nfully-qualified classname:method name tuple. So for example, if the dev\nwants a method named 'prePutCallback1' belonging to class\n'com.example.MyCallbacks and a method named 'prePutCallback2'\nbelonging to the same class to be invoked before any entity of kind 'yar' is\nput, the config file will look like this:\n\u003e\n\u003e yar.PrePut=com.example.MyCallbacks:prePutCallback1,com.example.MyCallbacks:prePutCallback2\n\u003e\n\u003cbr /\u003e\n\nNote that it is possible to have a line which refers to all kinds by\nomitting the kind name:\n\u003e\n\u003e .PreDelete=com.example.MyCallbacks:preDeleteCallback1\n\u003e\n\u003cbr /\u003e\n\n\nEach type of callback has its own signature requirements for the methods it\nannotates. If any of these signature requirements are violated the processor\nwill produce an error. See the javadoc for the annotations for more\ninformation about the callback-specific signature requirements.\n\n\nProcessor Options:\n\n- debug - turns on debug statements\n\n\u003cbr /\u003e"]]