Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.
Stay organized with collections
Save and categorize content based on your preferences.
Annotation Type PostLoad
public @interface PostLoad
Identifies a callback method to be invoked after an Entity of any of the specified kinds
is loaded from the datastore. This can happen as the result of a get() operation or a query. If
kinds() is not provided the callback will execute for all kinds. Methods with this
annotation must return void, must accept a single argument of type PostLoadContext, must not throw any checked exceptions, must not be static, and must belong to a
class with a no-arg constructor. Neither the method nor the no-arg constructor of the class to
which it belongs are required to be public. Methods with this annotation are free to throw any
unchecked exception they like. Throwing an unchecked exception will prevent callbacks that have
not yet been executed from running, and the exception will propagate to the code that invoked the
datastore operation that resulted in the invocation of the callback. Throwing an unchecked
exception from a callback will not have any impact on the result of the datastore
operation. Methods with this annotation will not be invoked if the datastore operation fails.