Introduction

This page provides links to tutorials detailing how to generate JPA (Java Persistence API) and CRUD (Create Read Update and Delete) classes and supporting files for SQL compliant databases using the Morel Island Database JPA and CRUD Generation plugin for the NetBeans IDE

It also reproduces the package summaries of the standard javadoc generated as part of the generation process.

Tutorials

The following tutorials are the best way to understand how to use the Morel Island Database JPA and CRUD Generation plugin for the NetBeans IDE.

  • JPA Entity and Controller Generation - Introductory SE Tutorial:
    • Installing the Morel Island Database JPA and CRUD Generation plugin.
    • Installing Optional Morel Island JPA Vendor plugins.
    • Creating a Morel Island Database Metadata File and Capturing Database Metadata.
    • Generating JPA Entities and Controllers.
    • Switching Between JPA Vendors.
  • Web EE 6 CRUD User Interface Generation Introductory EE 6 Web Tutorial:
    • Installing OpenJPA and Hibernate JPA to GlassFish 3.1
    • Creating a Morel Island Database Metadata Reference File.
    • Generating the Model, View and Controllers (MVC).
    • Deploying the JDBC Driver.
    • Deploying and Using the Web CRUD User Interface.
    • Switching Between JPA Vendors.
    • Displaying null Check Boxes.
  • Servlet 3.0 Web CRUD User Interface Generation Intermediate SE Web Tutorial:
    • Installing and IDE Registering a Copy of Tomcat 7.1
    • Creating a Morel Island Database Metadata Reference File.
    • Handling JPA Entities and Controllers (the Model)
    • Generating the Controller and View.
    • Deploying and using the Web CRUD User Interface.
    • Switching Between JPA Vendors.
    • Displaying null Check Boxes.
  • NetBeans CRUD User Interface Generation Intermediate NetBeans Application Tutorial:
    • Installing the Morel Island NetBeans Database CRUD Application Template plugin.
    • Creating a Morel Island NetBeans CRUD Application Project.
    • Creating a Morel Island Database Metadata Reference File.
    • Handling JPA Entities and Controllers.
    • Generating the NetBeans CRUD User Interface.
    • Using the NetBeans CRUD User Interface.
    • Displaying null Check Boxes and Using Enquiry Mode.
    • Loading the CRUD User Interface into the Development IDE.
  • Modifying Captured Morel Island Database Metadata and Adding Missing Information Advanced Tutorial:
    • Correcting Existing Database Metadata.
    • Updating Database Metadata with Database Changes.
    • Adding Missing Database Metadata.
    • Adding Additional Database Metadata.
    • Updating JPA with Changes to the Database Metadata.
    • Updating the Web CRUD UI with Changes to the Database Metadata
    • Updating the NetBeans CRUD UI with Changes to the Database Metadata

Online Javadoc

All generated code is fully documented for use with javadoc. View full online javadoc for the sample database shipped with the NetBeans IDE:

Package Summaries

Javadoc package summary documentation has been reproduced below for the sample database shipped with the NetBeans IDE.

Java Persistence API

Entities

Java Persistence API entities and entity keys for the Sample database.

Entities in this package are complex entities. That is they contain related child, parameter and parent entities which exist in the database at either a physical or logical level. Related entities are not annotated with a fetch sytle (eager or lazy), rather it is left to the Java Persistence API implementation being used to determine when related entities are attached.

Related parent, parameter and child entities should only be accessed for managed entities within a transaction.

Events

Java Persistence API entity listeners for the Sample database.

All listeners are generated by the Morel Island Java Services JPA and CRUD Generation plugin for the NetBeans IDE with no methods if they do not already exist. Methods annotated with entity listener annotations such as @PrePersist @PreUpdate etc. can be added to the classes and will be called at the appropriate time in the entity persistence lifecycle.

SE6 Controllers

Java Persistence API SE entity controllers for the Sample database.

SE6 Transactions

Java Persistence API thread safe programmatic SE transaction support for the Sample database.

EE6 Facades

Java Persistence API Enterprise Edition stateless session bean entity facades for the Sample database.

Web CRUD User Interface

SE6 Controller Style

User interface controllers and utilities for create, read, update and delete access to the Sample database.

Controllers use Java Persistence API entities as the model and entity controllers for database operations.

Utilities convert view http parameters to detached entities for processing by controllers.

There are three types of controllers for each table in the database:

  • Create Update Delete - Handling requests for database row modification views and the processing of operations from the modification view
  • Read - Handling read requests and the processing of operations from the read view
  • View - Handling row view requests and the processing of operations from the row view. In addition to the individual row from the table all child rows from related tables are also passed to the view. The child rows are passed as separate entities or entity lists as apposed to being included in the base entity to avoid lazy loading errors when processed by the view

The user interface allows full control over the setting of null values by setting the context parameter displayNullCheckBoxes to true in the web.xml configuration file. Some databases (notably Oracle) treat the empty string as a null, others distinguish between the two. The user interface supports both handlings and allows the blank string to be compared to and changed to a null and vica versa in databases where they are considered different.

EE6 Facade Style

User interface controllers and utilities for create, read, update and delete access to the Sample database.

Controllers use Java Persistence API entities as the model and Controllers use java persistence API entities as the model and container managed transaction stateless session bean facades for database operations and as such can only be used within an EE 6 server.

Utilities convert view http parameters to detached entities for processing by controllers.

There are three types of controllers for each table in the database:

  • Create Update Delete - Handling requests for database row modification views and the processing of operations from the modification view
  • Read - Handling read requests and the processing of operations from the read view
  • View - Handling row view requests and the processing of operations from the row view. In addition to the individual row from the table all child rows from related tables are also passed to the view. The child rows are passed as separate entities or entity lists as apposed to being included in the base entity to avoid lazy loading errors when processed by the view

The user interface allows full control over the setting of null values by setting the context parameter displayNullCheckBoxes to true in the web.xml configuration file. Some databases (notably Oracle) treat the empty string as a null, others distinguish between the two. The user interface supports both handlings and allows the blank string to be compared to and changed to a null and vica versa in databases where they are considered different.

Palm Trailer

Home Java Home Documentation Downloads Links Contact Us

Palm Trailer Last Updated 12 Feb 2012