Jessen Gan | 18 Jun 2012 04:07
Picon

Is there any possible way bind Protocol Buffer with Hibernate,MyBatis Or JDBC

Recently,I used Protocol Buffer as a middleware to trans data between server and mobile_client.Read data from database by hibernate into java entities,then add into Protocol Buffer Object property one by one.It's a very heavy method.


But I googled many key worlds to find a shortcut to do the this.the result is null.


Did any one have this situation like me

How did you handle this.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/ysFQ9w8OwV0J.
To post to this group, send email to protobuf <at> googlegroups.com.
To unsubscribe from this group, send email to protobuf+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Oliver Jowett | 18 Jun 2012 20:08
Picon

Re: Is there any possible way bind Protocol Buffer with Hibernate,MyBatis Or JDBC

On Mon, Jun 18, 2012 at 3:07 AM, Jessen Gan <jessengjx <at> gmail.com> wrote:
> Recently,I used Protocol Buffer as a middleware to trans data between server
> and mobile_client.Read data from database by hibernate into java
> entities,then add into Protocol Buffer Object property one by one.It's a
> very heavy method.
>
> But I googled many key worlds to find a shortcut to do the this.the result
> is null.

If you have a set of rules that map your Java fields/methods to
protobuf field names, then you could build the message reflectively
via DynamicMessage.Builder, perhaps?

Oliver

--

-- 
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to protobuf <at> googlegroups.com.
To unsubscribe from this group, send email to protobuf+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.

Jessen Gan | 28 Jul 2012 10:07
Picon

Re: Is there any possible way bind Protocol Buffer with Hibernate,MyBatis Or JDBC



在 2012年6月19日星期二UTC+8上午2时08分14秒,Oliver写道:
On Mon, Jun 18, 2012 at 3:07 AM, Jessen Gan <jessengjx <at> gmail.com> wrote:
> Recently,I used Protocol Buffer as a middleware to trans data between server
> and mobile_client.Read data from database by hibernate into java
> entities,then add into Protocol Buffer Object property one by one.It's a
> very heavy method.
>
> But I googled many key worlds to find a shortcut to do the this.the result
> is null.

If you have a set of rules that map your Java fields/methods to
protobuf field names, then you could build the message reflectively
via DynamicMessage.Builder, perhaps?

Oliver

Thanks answer,is there any tools to do this ?? 

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/_MpjCBfk578J.
To post to this group, send email to protobuf <at> googlegroups.com.
To unsubscribe from this group, send email to protobuf+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.

Gmane