About CRUD Applications
See Also
A Create, Read, Update, and Delete (CRUD) application is a simple programming pattern that allows you to read
and manage the data in a data source.
The IDE provides support for this common programming task by letting you quickly generate code for CRUD
functionality based on entity classes in your project.
A JSF application that implements CRUD functionality typically contains the following artefacts.
- JPA Controller classes.
A typical JSF application may have JPA and JSF controller classes.
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.
A 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.
Generally you would not need to modify the JPA controller classes unless the database schema changed, in which case
you could regenerate the classes for the new schema.
- JSF Controller classes.
A JSF controller class generally contains code that invokes methods in the JPA controller classes and
demonstrates which exceptions to catch.
To modify your application you would generally modify the JSF controller classes.
- JSF Converter classes. A JSF converter class takes input from the form and converts it into the type that matches the data
in the data source.
- JSP pages. The JSP pages are the web user interface for accessing and modifying the data in the data source.
The following wizards generate code for implementing CRUD functionality in the application.
- JPA Controller Classes from Entity Classes. This wizard generates the CRUD controller classes based on the entity classes in the project.
The wizard creates one controller for each entity class and places the controller in the same package as the entity class.
- JSF Pages from Entity Classes. This wizard generates the JSF controller classes, converters and JSP pages based on the entity classes in the project.
For each entity class, the wizard creates four JSP pages that let you view, edit, create, and destroy entries in the data source.
The JSP pages use the JSF framework and access the JSF converter and controller classes.
- See Also
- Generating JSF Pages from an Entity Class
- Creating an Entity Class
- Generating JPA Controller Classes from an Entity Class
- Generating Persistent Entity Classes from a Database
- Adding JSF Support to an Existing Application
- About Web Application Frameworks
Legal Notices