About CRUD Applications
See Also
A Create, Read, Update, and Destroy (CRUD) application is a simple programming
pattern that allows you to read and manage the data in a data source. The IDE
provides automatic support for this common programming task by letting you quickly
generate a CRUD application from an entity class.
The CRUD application is a web application that uses the JSF framework. An entity
class is a class that uses the Java Persistence API to access data in a data
source. You can generate a CRUD application from an entity class in a web application
using the JSF Pages frorm Entity Class file template in the Persistence category of
the New File wizard.
The IDE generates the following artifacts for a CRUD application:
- Controller classes. A controller class is a wrapper for an entity
class that provides clients with access to the database through the methods
in the entity class. For example, the controller class has methods for creating
and deleting an entry in the data source, getting all of the entries in the
data source, or getting a specific entry in the data source. The controller,
together with faces-config.xml, also specifies navigation between pages. The IDE creates
one controller for each entity class and places the controller in the same
package as the entity class. The controller class is registered as a JSF managed
bean in faces-config.xml.
- Converter classes. A converter class converts data from the data source into
strings that are displayed in list boxes and menus and vice versa. The converter
class is registered as a JSF converter in faces-config.xml.
- JSP pages. The JSP pages are the web user interface for accessing
the data in the data source. For each entity class, the IDE creates four JSP
pages that let you view, edit, create, and destroy entries in the data source.
- See Also
- Creating a New Application with JSF
Support
- Adding JSF Support to an Existing Application
- Generating JSF Pages from an Entity
Class
- Creating an Entity Class
- Generating Persistent Entity Classes from a Database
Legal Notices