Class PreQueryContext
java.lang.Object
com.google.appengine.api.datastore.PreQueryContext
- All Implemented Interfaces:
CallbackContext<Query>
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 CallbackContext.getCurrentElement(). This is an effective way to modify queries
prior to execution.-
Method Summary
Modifier and TypeMethodDescriptionReturns the element for which the callback has been invoked.intReturns the index in the result ofCallbackContext.getElements()of the element for which the callback has been invoked.Returns the current transaction, ornullif there is no current transaction.Returns an unmodifiable view of the elements involved in the operation that triggered the callback..toString()
-
Method Details
-
getElements
Description copied from interface:CallbackContextReturns an unmodifiable view of the elements involved in the operation that triggered the callback..- Specified by:
getElementsin interfaceCallbackContext<T>
-
getCurrentTransaction
Description copied from interface:CallbackContextReturns the current transaction, ornullif there is no current transaction.- Specified by:
getCurrentTransactionin interfaceCallbackContext<T>
-
getCurrentIndex
public int getCurrentIndex()Description copied from interface:CallbackContextReturns the index in the result ofCallbackContext.getElements()of the element for which the callback has been invoked.- Specified by:
getCurrentIndexin interfaceCallbackContext<T>
-
getCurrentElement
Description copied from interface:CallbackContextReturns the element for which the callback has been invoked. Shortcut forgetElements().getCurrentIndex().- Specified by:
getCurrentElementin interfaceCallbackContext<T>
-
toString
-