Is it something that I did not get properly w.r.t. mapper or is my question
invalid?
Thanks,
Pratz
On Thursday, August 8, 2013 6:20:51 PM UTC+5:30, prateek sharma wrote:
>
> Hi all,
> I am new to buffers, using it with my java project.
> I have one doubt about initializing proto buffer entities.
>
> Initializing this proto buffer entity is done manually in all the examples
> given in tutorial, examples used setters to set the values directly to
> proto buffer entities but what when I have a base entity which I want to
> convert to proto buffer entity? Do I need to take values from the base
> entity and initialize proto buffer entity or there are any mapper available
> to do this task?
>
> For example:
> In my project if I have a base entity vehicle which has parameters as
> id int
> name String
> type int
>
> I wrote a .proto file vehicle.proto as
> message vehicle_proto{
> required int32 id = 1; // Unique ID number for this person.
> required string name = 2;
> optional string type = 3;
> }
>
> It created a file VehicleProto.java.
>
> Now I have one entity vehicle and one entity VehicleProto and want to map
> vehicle to VehicleProto. How can I do it automatically?
>
> Thanks,
> Pratz
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.