This content has been marked as final.
Show 2 replies
-
1. Re: suggestions on how to use EMF domain models in Errai
jfuerth Mar 22, 2013 10:31 AM (in response to magick93)I'm not familiar with the EMF for GWT project, but it sounds like the model classes it generates don't include a no-arg constructor. Errai supports three scenarios for marshallable objects:
- Java classes that include a no-arg constructor, which need not be public (the class can have other constructors in addition to the no-arg one)
- Java classes that have a constructor with each argument annotated with @MapsTo. Again, the constructor does not need to be public.
- Java classes with a static factory method, each argument annotated with @MapsTo
If you can't modify the model objects, and you can't convince EMF to satisfy one of the above scenarios, you will have to resort to writing custom mappings.
All of the above is covered in the Marshalling chapter of the Errai Reference Guide: https://docs.jboss.org/author/display/ERRAI/Marshalling
Good luck,
Jonathan
-
2. Re: suggestions on how to use EMF domain models in Errai
magick93 Mar 22, 2013 10:40 AM (in response to jfuerth)I am looking at using EMF with Acceleo, as this means I can design templates and fairly freely map EMF to whatever template design.
I will let you know how it goes.