I have a question regarding "*Protocol buffer generated java class*". 
Is there is any way to customise it, so that I do not have to copy member 
by member for conversion from java object to protobuf object and vice-versa.

*For Instance:*

I have java class:

class Dummy{
 int id;
}


I have protocol buffer (.*proto*) file:

message Dummy{
required int id = 1;
}


Now, for converting the java object to the proto buf or vice versa ,I have 
to assign member by member to objects [java/protobuf].

In the above case for converting the java object [javaObj] to protobuf 
object [protoObj] :

 Dummy protoObj = null;
 Builder builder = ProtoDummy.Dummy.newBuilder();
 builder.setId(javaObj.getId());
 protoObj = builder.build();


Similarly, for coverting from protobuf to java object, I have to perform 
member by member copy.

Is there is a way to directly assign the object or faster way than the one 
I am using.

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to