App Engine Java SDK version 1.7.0
[gae.git] / java / src / main / com / google / appengine / api / datastore / PreQueryContext.java
blob637983d0bd2902c9b5f18be5bd29e487bd06ad7c
1 // Copyright 2012 Google. All Rights Reserved.
2 package com.google.appengine.api.datastore;
4 import java.util.Arrays;
6 /**
7 * Concrete {@link CallbackContext} implementation that is specific to
8 * intercepted queries. Methods annotated with {@PreQuery} that receive
9 * instances of this class may modify the {@link Query} returned by calling
10 * {@link #getCurrentElement()}. This is an effective way to modify queries
11 * prior to execution.
14 public final class PreQueryContext extends BaseCallbackContext<Query> {
16 PreQueryContext(CurrentTransactionProvider currentTransactionProvider, Query query) {
17 super(currentTransactionProvider, Arrays.asList(new Query(query)));
20 @Override
21 String getKind(Query query) {
22 return query.getKind();