I am developing an appengine project and storing my data using Google Datastore. I am using different Datastore libraries as they are the ones used in the examples, but I find it kind of weird that I have to use both:
If I check the docs for querying, in this example they use this library to process queries:
com.google.appengine.api.datastore
https://cloud.google.com/appengine/docs/java/datastore/retrieving-query-results
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); PreparedQuery pq = datastore.prepare(q); Entity result = pq.asSingleEntity();
However, in this example to store data, they use
com.google.cloud.datastore
https://cloud.google.com/datastore/docs/concepts/entities
Entity task = Entity.builder(taskKey) .set("category", "Personal") .set("done", false) .set("priority", 4) .set("description", "Learn Cloud Datastore") .build();
Right now I am able to use both but I am wondering which one is better for which kind of purpose or if they are just the same libraries with different packages. However, I am looking for a way to remove one of them.