}
}
public static Key putTempData(TempData data) {
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
Transaction txn = ds.beginTransaction(TransactionOptions.Builder.withXG(true));
try {
Class<? extends TempData> type = data.getClass();
String kind = getKind(type);
Entity entity = new Entity(kind);
for (Map.Entry<String, Object> entry : data.toProperties(ds).entrySet()) {