RequestFactory and Google Data Store

32 views
Skip to first unread message

MagusDrk

unread,
Nov 28, 2011, 5:46:49 PM11/28/11
to Google Web Toolkit
Hello everybody.

I have a simple question. Can I use the @PersistenceCapable
annotation(data store) and the @Entity annotation in the same class
(classes).

I've just find RequestFactory to use data model in cliente side, but
I'm not sure how can it change my actual model. Can I keep my
@Persistent annotations in the class or have I to change them to the
javax.annotation ones? (I'd love some tutorial reference or something
like that)

PDT: how can I generate the Proxy entities, the service locators and
the rest of the RequestFactory structure with eclise? I mean, I have
the model (@PersistenceCapable and/or @Entity) with a couple of
entities (as 10), but I want to avoid typing to much code repeating
@ProxyFor, @ProxyValue, etc, instead, I'd like to use an eclipse
generator wich would create the basic code structure.

Thanks a lot.

Magus.

Thomas Broyer

unread,
Nov 29, 2011, 6:28:27 AM11/29/11
to google-we...@googlegroups.com


On Monday, November 28, 2011 11:46:49 PM UTC+1, MagusDrk wrote:
Hello everybody.

I have a simple question. Can I use the @PersistenceCapable
annotation(data store) and the @Entity annotation in the same class
(classes).

I've just find RequestFactory to use data model in cliente side, but
I'm not sure how can it change my actual model. Can I keep my
@Persistent annotations in the class or have I to change them to the
javax.annotation ones? (I'd love some tutorial reference or something
like that)


RequestFactory does not mandate much things for your domain classes, and nothing is related to persistence. In other words, RF is "persistence agnostic". FYI, we use it with MongoDB and Morphia on the server-side, nothing to do with JPA or JDO.
 

PDT: how can I generate the Proxy entities, the service locators and
the rest of the RequestFactory structure with eclise? I mean, I have
the model (@PersistenceCapable and/or @Entity) with a couple of
entities (as 10), but I want to avoid typing to much code repeating
@ProxyFor, @ProxyValue, etc, instead, I'd like to use an eclipse
generator wich would create the basic code structure.

It seems to be possible in a project with both the AppEngine and GWT natures.

In our project, I coded a Maven plugin that generates the proxies from our domain classes automatically at build time (we have nearly 160 such proxies, and only 20 additional proxies maintained "by hand")

MagusDrk

unread,
Nov 29, 2011, 8:09:26 AM11/29/11
to Google Web Toolkit
Thomas, Thanks a lot! Very clear!
Reply all
Reply to author
Forward
0 new messages