Hi all,
I've got an architectural issue frustrating me from several days. I'm
quite new to GoogleAppEngine, so perhaps I'm not completely aware of
all the possibilities of this framework.
Let's say I've got this configuration: on GoogleAppEngine there is my
backend, providing several APIs via servlets.
Then I've got an Android client calling these API.
I would like to share my Java beans between backend and Android,
placing them in a library agnostic from GoogleAppEngine stuff (and
possibily also from JDO).
Then in the backend I would like to extend these communication beans
in order to add the stuff for the persistence on Datastore (e.g.
Datastore keys, other persistent fields not visible to the client,
etc.).
In this scenario I'm not able to set the correct annotation properties
of my beans.
E.g.
//this is one of the communication beans
public class CommUser {
@Persistent
string name;
// other properties...
}
//this is a class in the backend
@PersistentCapable
public class DBUser extends CommUser {
@PrimaryKey
@Persistent
Key id;
//other stuff...
}
In this example, I would like to see all the CommUser fields marked as
@Persistent (as e.g. "name") to be added to the entities of type
DBUser, but this is not the case :(
The only way I'm able to use this model is to make CommUser
@PersistentCapable and add the Key directly to CommUser (with some
other customization regarding the inheritance policies), but in this
case I cannot place CommUser in an external library.
Is there a common pattern to face up this problem?
Thank you very much!
Bye
cghersi
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.