Created an issue for this:
http://code.google.com/p/protobuf/issues/detail?id=61

On Nov 17, 12:56 pm, Kenton Varda <[EMAIL PROTECTED]> wrote:
> I would call it a ListBuilder or a RepeatedFieldBuilder, but it sounds like
> a reasonable idea.
>
> On Sun, Nov 16, 2008 at 5:40 AM, bivas <[EMAIL PROTECTED]> wrote:
>
> > use case (written in Java):
>
> > public class MyService {
>
> >        private final ServiceDAO serviceDAO;
>
> >        // constructor, getters, setters
>
> >        public void handleRequest(InputStream in, OutputStream out) {
> >                List<String> results = serviceDAO.findAllCodes();
> >                // create the collection builder for MyMessage instance
> >                MyProtos.MyMessage.CollectionBuilder collectionBuilder =
> > MyProtos.MyMessage.newCollectionBuilder();
> >                for(String code: results) {
> >                        // create the single MyMessage instance
> >                        final MyProtos.MyMessage message =
> > MyProtos.MyMessage.newBuilder
> > ().setCode(code).build();
> >                        collectionBuilder.add(message);
> >                }
> >                collectionBuilder.build().writeTo(out); // this will result
> > writing
> > of the repeated items
> >         }
>
> > }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to