Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Getting Started

Chapter 2. Getting Started

One of the main goals of JPA was that it should be simple to use and easy to understand. Although its problem domain cannot be trivialized or watered down, the technology that enables one to deal with it can be straightforward and intuitive. In this chapter, we will show how effortless it can be to develop and use entities.

We will start by describing the basic characteristics of entities. We'll define what an entity is and how to create, read, update, and delete it. We'll also introduce entity managers and how they are obtained and used. Then we'll take a quick look at queries and how to specify and execute a query using the EntityManager and Query objects. The chapter will conclude by showing a simple working application that runs in a standard Java SE environment and that demonstrates all of the example code in action.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint