cgen (Ant or Maven variety) support custom templates and generation modes (either one run per DataMap or one run per ObjEntity):

http://cayenne.apache.org/doc30/cgen.html
http://cayenne.apache.org/doc30/maven2-cgen.html

So you can definitely implement class generation around Cayenne mapping for your own purposes. A good starting point is Cayenne default templates located in the distribution under "src/dotemplates/ v1_2". They also contain comments on what variables can be included in the template, etc.

Andrus



On Jan 28, 2010, at 9:50 AM, John Armstrong wrote:
I'm finding myself generating a lot of Beans that mirror my cayenne
entities (plus Dozer mappings) as I delve into GWT.

This is crying out for automation and I'm sure a few others would
enjoy it. It may even make Cayenne very GWT Friendly.

To move this ball forward (for me minimally) can anyone point me to
either some sort of sample implementation of Cayenne velocity template
based code generation (or whatever is being used in 3.0) or a pointer
to where in the source code a sample template/generator lives that I
can explore?

Tx. My fingers are getting sore-
John-


Reply via email to