0

I'm writing Java app using GWT on Google AppEngine. So I have JDO Entities on Server side and POJO DTOs on Client's side. For some of my entities I have to use Key objects for ids Pojo's cannot have that object because that is not standard class. is there any easy work around for this so I can use Key object on server side and String or Long on client's side.

Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
Maksim
  • 16,635
  • 27
  • 94
  • 135
  • 1
    If I understood the question correctly, it is a duplicate of http://stackoverflow.com/questions/988217/gwt-with-jdo-problem – jsight Jul 10 '09 at 02:07

2 Answers2

2

You can use the Key class in GWT code by adding these additional jar files:

http://www.resmarksystems.com/code/

  • appengine-utils-client-1.0.jar
  • appengine-utils-server-1.0.jar

This basically gives the GWT compiler a GWT-friendly version of the Key and other AppEngine classes. (like Text, Blob and User..)

To use:

  • Add the appengine-utils-client-1.0.jar anywhere in your build path.
  • Put the appengine-utils-server-1.0.jar to your WEB-INF/lib folder.

In your GWT module add the following:

<inherits name="com.resmarksystems.AppEngineDataTypes"/>
Nick Siderakis
  • 1,961
  • 2
  • 21
  • 39
1

The question is a duplicate, like the comment says, but I'll add another thing for you to think about. I'm trying out Objectify now and I think its fantastic (and its fully operable with GWT without DTOs.) Take a look at it.

Sudhir Jonathan
  • 16,998
  • 13
  • 66
  • 90