HomeEMF HibernateEMF JDO/JPOXWeb App GenerationServices
 

Tutorial: Using JPOX in the EMF Editor

This tutorial gives an example on how the JPOX/EMF resource can be used in the Library editor. This tutorial assumes that you have performed the generate jdo file step of the Library tutorial and done the EMF library tutorial.

There are two ways to start the Library editor example:

  1. Using the model wizard created by EMF
  2. Make use of the resource utility provided by Teneo

This tutorial primarily describes the first approach. To start the editor using the resource utility then a small part in this tutorial should be omitted (changing the start method, see next step in this tutorial).

To enable JPOX support for the Library Editor a number of small changes have to be made to the generated Editor and Model code of the library example:

  • Initialization: initialize the JPOX layer
  • Repair small 'bug' in generated editor code: the generated editor allows the creation of invalid objects, e.g. a Library with an empty name. The EMF/JPOX integration is more precise and will not allow this.

This tutorial shows a 'quick-and-dirty' method to let the Library example work with the EMF/JPOX resources. The chosen approach is to make very small changes to the generated code and is not focused on an elegant or optimal solution.

The next step of this tutorial describes these changes in more detail.