Google App Engine を使用してデータを保存および読み取る方法がわかりません。このコードはコンパイルされませんが、私が何をしたいのかがわかります。私が理解できない唯一のことは、文字列から独自のキーを作成する方法です....
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Entity article = new Entity("Article", "keyThatIMadeUp");
article.setProperty("articleHTML", "this is where the article html goes");
datastore.put(article);
try {
Entity articleRetrieved = datastore.get(Key("keyThatIMadeUp"));
}
catch (EntityNotFoundException e) {
System.out.println("data not found");
}
どんな助けでも大歓迎です!