JPA generator creates source code that implements the persistence layer of an application. The type of application typically is a desktop application, a web application or a web service.
The generation result provides sophisticated means to create test data and to test the persistence layer. The persistence layer can be used in a standalone Java application and also for applications that are deployed in a JEE application server.
The generator uses a top-down approach, which means, it is meant to be used when there is not yet a database schema available.
It can be beneficial to use the persistence model that is used as the input for the generator for other models and generations, too. You could for instance use a persistence model to generate a web service that provides means to read/write the data or to generate a user interface where the model is mapped to ui input components.
You can model entities that have fields with a complex type (type [type-name] …) or an enumeration (enumeration [enumeration-name] …). Complex types and enumerations are part of the Basic DSL. The
JPA generator is not capable of generating source code for such model elements.
You need to use the
Java generator to generate source code for complex types and enumerations.
Technologies, Frameworks, Libraries¶
- Java Persistence Architecture (JPA)
- Relational Database Management Systems (RDBMS)
- Structured Query Language (SQL)
- JUnit, Arquillian (optional)