Hi Fred, Lists/Sets implement the Iterable interface, so create any list type (ArrayList/LinkedList) you want and then just add them to that.
List<Entity> entities = new ArrayList<Entity>(); while (more entities) { entities.add(entity); } datastore.put(entities); Stephen CortexConnect cortexconnect.appspot.com On Tue, Jul 26, 2011 at 2:41 PM, Fred Ross-Perry <fredrosspe...@gmail.com>wrote: > I'm working on a tool using Java on the client side to backup and restore > data. > The restore side involves reconstructing entities form XML data, and > putting them > to the datastore. Right now I am doing them one at a time, like this: > > while (there are more entites) > { > Entity entity = convert from XML to Entity here > datastore.put(entity); > } > > But I'd like to do it in batches. > I see that there is also > > datastore.put(Iterable<Entity>**) > > How do I build up an Iterable<Entity> form a series of Entitys? > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to > google-appengine@googlegroups.**com<google-appengine@googlegroups.com> > . > To unsubscribe from this group, send email to > google-appengine+unsubscribe@**googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at http://groups.google.com/** > group/google-appengine?hl=en<http://groups.google.com/group/google-appengine?hl=en> > . > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.