Java Class Generation

From: Andrei Adamchik (aadamchi..obox.com)
Date: Sat Jul 28 2001 - 16:42:59 EDT


Guys,

are there any volunteers to implement Java class generation for Cayenne?

This should be some generic classes that can be later used in our GUI
tools, but for now we can write a wrapper to those classes to do it in the
command line. Functionality should be similar to "eogenerator" tool from
BlackSmith. For those not familiar with this tool, it can generate Java
classes given a model.

- It creates a Java class for each entity.
- It uses templates for the generated files. It allows to customize how
constructors, set and get methods are created. For example right now we do
not have a final format for DataObjects, and if we use a template approach,
class structure can painlessly evolve over time.
- It allows for superclass and subclass generation for each DataObject
class. Superclass will contain generated code, and therefore shouldn't be
changed manually, while subclass is usually empty and can be customized by
its users manually. So on subsequent runs, only superclasses may be
regenerated (say if DataMap has changed), but subclasses are left intact.

Let me know if anyone wants to work on that, we will discuss the details.

Andrei



This archive was generated by hypermail 2b30 : Sat Aug 04 2001 - 16:21:25 EDT