1 // Copyright 2012 Google Inc. All Rights Reserved.
2 package com
.google
.appengine
.api
.datastore
;
4 import com
.google
.common
.collect
.Lists
;
7 import java
.util
.concurrent
.Future
;
10 * {@link PostOpFuture} implementation that invokes PostLoad callbacks.
13 class PostLoadFuture
extends PostOpFuture
<Map
<Key
, Entity
>> {
14 private final CurrentTransactionProvider txnProvider
;
16 PostLoadFuture(Future
<Map
<Key
, Entity
>> delegate
, DatastoreCallbacks callbacks
,
17 CurrentTransactionProvider txnProvider
) {
18 super(delegate
, callbacks
);
19 this.txnProvider
= txnProvider
;
23 void executeCallbacks(Map
<Key
, Entity
> result
) {
24 PostLoadContext postGetContext
=
25 new PostLoadContext(txnProvider
, Lists
.newArrayList(result
.values()));
26 datastoreCallbacks
.executePostLoadCallbacks(postGetContext
);