| Line 20... |
Line 20... |
| 20 |
import com.google.appengine.api.datastore.DatastoreService;
|
20 |
import com.google.appengine.api.datastore.DatastoreService;
|
| 21 |
import com.google.appengine.api.datastore.DatastoreServiceFactory;
|
21 |
import com.google.appengine.api.datastore.DatastoreServiceFactory;
|
| 22 |
import com.google.appengine.api.datastore.Entity;
|
22 |
import com.google.appengine.api.datastore.Entity;
|
| 23 |
import com.google.appengine.api.datastore.PreparedQuery;
|
23 |
import com.google.appengine.api.datastore.PreparedQuery;
|
| 24 |
import com.google.appengine.api.datastore.Query;
|
24 |
import com.google.appengine.api.datastore.Query;
|
| - |
|
25 |
import com.google.appengine.api.datastore.Text;
|
| 25 |
|
26 |
|
| 26 |
public class DailyComparisonStatsGenerator extends HttpServlet {
|
27 |
public class DailyComparisonStatsGenerator extends HttpServlet {
|
| 27 |
private static final long serialVersionUID = -8236918415987438049L;
|
28 |
private static final long serialVersionUID = -8236918415987438049L;
|
| 28 |
|
29 |
|
| 29 |
public void doPost(HttpServletRequest req, HttpServletResponse resp) {
|
30 |
public void doPost(HttpServletRequest req, HttpServletResponse resp) {
|
| Line 93... |
Line 94... |
| 93 |
|
94 |
|
| 94 |
JSONObject comparisonStatsJSON = new JSONObject(comparisonStats);
|
95 |
JSONObject comparisonStatsJSON = new JSONObject(comparisonStats);
|
| 95 |
|
96 |
|
| 96 |
ComparisonStats compStats = new ComparisonStats();
|
97 |
ComparisonStats compStats = new ComparisonStats();
|
| 97 |
compStats.setId(id);
|
98 |
compStats.setId(id);
|
| 98 |
compStats.setComparisonStatsJSON(comparisonStatsJSON.toString());
|
99 |
compStats.setComparisonStatsJSON(new Text(comparisonStatsJSON.toString()));
|
| 99 |
|
100 |
|
| 100 |
ComparisonStatsRepository repo = new ComparisonStatsRepository();
|
101 |
ComparisonStatsRepository repo = new ComparisonStatsRepository();
|
| 101 |
repo.store(compStats);
|
102 |
repo.store(compStats);
|
| 102 |
}
|
103 |
}
|
| 103 |
|
104 |
|