O'Reilly logo

EJB 3.1 Cookbook by Richard M. Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Populating the Patient and Medication tables

In this recipe, we will learn how to create and populate the Patient and a Medication table. These tables will be used for the other recipes in this chapter. This approach means you do not have to import or otherwise use an existing database. The process of creating these tables is facilitated through several helper methods. Upon completion of this recipe, you will have the base for learning how to use JPQL as illustrated in the remaining recipes.

Getting ready

The process of creating this application consists of:

  1. Creating five classes
    • Patient An entity representing a patient
    • Medication An entity representing the medications used by a patient
    • AbstractFacade A base class used by the next two classes
    • PatientFacade ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required