How do I generate ONLY java interfaces from UML?

I would like to generate only java interfaces and sql ddl from UML. I will be implementing the ORM myself. Without going into pros/cons of whether my approach is best, I would like to know how I can generate the interfaces.

Hi janaki,

I am not sure what are the interfaces that you are referring to. There are several items that we will generate but none of them are Java Interfaces…

  1. Persistence layer (orm.jar)
  2. Persistent classes (not interface)
  3. DDL file

Would you mind telling me more about your need?


We have specific requirements on the ORM. So, we would like to generate the java classes for the model classes. For these, we would like to plug in our own implementation of these. There is a flag I can set on the class specification indicating that it is an ‘interface’, but that doesn’t seem to do the trick.

Basically, I would like to use your tool to create the model. Then, generate both DDL and Java classes from it. But, not the ORM implementation.

Dear janaki,

You can achieve what you want by generating the Persistent API as POJO classes. which have no dependency with our ORM tier. For more details, please refer to the steps below:

  1. Construct your model.
  2. Select Tools | Object Relational Mapping | Generate Code… from main menu. This shows the Database Code Generation dialog box.
  3. From the Persistent API combo box, select POJO.
  4. Specify other parameters such as Output Path.
  5. Click OK to start generation…
  6. You will find that a set of Java files are generated to the Output Path. Remove those sample source files and those DAO files (those ends with … The remaining files are source code for your model.

By the way, you can also consider to reverse engineer your database and run normal code synchronization to generate pure source code for the class models.

Best Regards,