Skip to main content

Home/ Groups/ GAE - Datastore
Esfand S

how to select first entity from a BigTable - Google App Engine | Google Groups - 0 views

  • In Java you can use Query cursors to [1] limit your results.  As far as aggregate functions (like MIN and MAX) you can use [2] indexes to achieve the similar result (ie. order by age and get the top result) [1] http://code.google.com/appengine/docs/java/datastore/queriesandindexe... <http://code.google.com/appengine/docs/java/datastore/queriesandindexe...> [2] http://code.google.com/appengine/docs/java/datastore/queriesandindexe... <http://code.google.com/appengine/docs/java/datastore/queriesandindexe...> On Sat, Dec 4, 2010 at 10:31 AM, Jeff Schwartz <jefftschwa...@gmail.com>wrote:
  • Objectify is a thin wrapper library around the native low level java datastore api. It adds numerous convenience methods but doesn't stray from the low level api. In addition, it allows you to define your models as pojos using java annotations for things like numeric and string key ids, properties which are keys of a parent, etc. I wouldn't think of using anything else. The low level api examples I just gave you map very closely to how you would accomplish the same thing in Objectify. You can read more about Objectify on their wiki at http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjec....
Esfand S

Same infamous question - JDO or JPA - want to hear from people who used both! - Google ... - 0 views

  • LL API, Slim3 or Objectify - depending on your needs. If your data is rather static (i.e. no variation in attributes of entities of the same kind), you may well stick with annotated classes - meaning Slim3 or Objectify - otherwise (i.e. attributes may vary and/or you maintain your own metadata), you might be better off with the LL API (an Entity is basically just a collection of name-value pairs, aka a Map, that has a key). Dunno Twig and SimpleDS - but similar considerations surely apply also to those. IMHO JDO and JPA, having grown up in the backyard of relational databases, may not be well suited for the big table.
Esfand S

Entity relations (JPA vs lowlevel API) - Google App Engine for Java | Google Groups - 0 views

  • If you want to group some A, B & C entities in the same entity group, you have to say (for example) that A is a parent of B (via a @Parent Key<A> key in B) and then that B is a parent of C (via a @Parent Key<B> in C). You can add @Transient if you don't want the Keys to be stored as properties of the entity Then you can query with ancestor() filter.
Esfand S

KeyRange - 0 views

  • public final class KeyRangeextends java.lang.Objectimplements java.lang.Iterable<Key>, java.io.Serializable Represents a range of unique datastore identifiers from getStart().getId() to getEnd().getId() inclusive. The Keys returned by an instance of this class have been consumed in the datastore's id-space and are guaranteed never to be reused. This class can be used to construct Entities with Keys that have specific id values without fear of the datastore creating new records with those same ids at a later date. This can be helpful as part of a data migration or large bulk upload where you may need to preserve existing ids and relationships between entities. This class is threadsafe but the Iterators returned by iterator() are not.
1 - 18 of 18
Showing 20 items per page