On Tue, Jul 26, 2011 at 11:41 PM, Fred Ross-Perry
<[email protected]>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?
>
You can serialize your list of entities in XML as for one single one.
Then you retrieve it and build a List<Entity> from your entity and just pass
it to the datastore.put batch function.
Is it what you want because i'm not sure to understand!
regards
Pascal
> 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<[email protected]>
> .
> To unsubscribe from this group, send email to
> google-appengine+unsubscribe@**googlegroups.com<google-appengine%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.