This is my scenario:
My server has a load of persistent objects. However, I need the client to access the domain model, but I don't want to send persistent objects to the client. In fact, I cannot do this since I use WebServices (which lacks supports for stuff like Sets)
So I have a "shadow" class hierarchy that looks just like my persistent classes, except that Sets are java arrays, etc.
Is there an easy way to copy between the persistent and non-persistent object graph?
I guess I could look into the reflection / hibernate metadata API, but if there is a standard solution...
I guess I would also need to specify how much of the graph to copy.
Difficult problem?
|