A JPA controller class is a wrapper for an entity class that provides clients with access to the database through the methods in the entity class. The JPA controller class contains the logic for creating, editing and destorying an entry in the data source, getting all of the entries in the data source, and getting a specific entry in the data source.
The JPA Controller Classes from Entity Classes wizard generates JPA controllers based on entity classes in your application. The wizard generates one JPA controller class for each entity class that you select and places the controller class in the specified location. Each generated JPA controller class contains create, edit and destroy methods and methods for retrieving the entities and uses an entity manager for managing entity persistence. The wizard also generates exception classes used by the controller classes.
To generate a JPA controller class from an entity class:
After the wizard generates the JPA controller classes, the controller methods can be invoked from JSP pages or JSP converters or other classes in your application. If the database schema changes you can use the IDE wizards to again generate new entity classes and controller classes and then where necessary update the code that invokes the controller methods.