内容説明
Pro JPA 2 introduces, explains, and demonstrates how to use the Java Persistence API (JPA). JPA provides Java developers with both the knowledge and insight needed to write Java applications that access relational databases through JPA.
Authors Mike Keith and Merrick Schincariol take a handson approach to teaching by giving examples to illustrate each concept of the API and showing how it is used in practice.
All of the examples use a common model from an overriding sample application, giving readers a context from which to start and helping them to understand the examples within an already familiar domain.After completing the book, you will have a full understanding and be able to successfully code applications using JPA. The book also serves as a reference guide during initial and later JPA application experiences.
- Hands-on examples for all the aspects of the JPA specification, based on the reference implementation of this specification
- A special section on migration to JPA
- Expert insight about various aspects of the API and when they are useful
- Portability hints to provide increased awareness of the potential for nonportable JPA code
What youll learn
- Get started with enterprise applications using JPA 2
- Get up to speed with objectrelational mapping and Entity Manager
- Learn and use queries and the query language (JP QL)
- Employ advanced objectrelational mapping techniques
- Use XML mapping files and learn other advanced techniques
- Package and deploy your Java persistence applications
- Test your Java persistence applications
- Migrate your Java persistence applications
Who this book is for
The book generally targets enterprise and persistence developers who fall in one of three categories:
- Those who are new to persistence; we will present some background information and introduce these readers to the basic persistence concepts to bring them up to speed.
- Those who know and/or use existing ORM persistence products such as Hibernate or TopLink.
- Those who have already used JPA and want to learn about newer features introduced by JPA 2, or have a good reference book to consult when they develop JPA applications.
In general, we assume that the reader is knowledgeable with Java, SQL, and JDBC, and has a little knowledge of J2EE.
Table of Contents
- Introduction
- Getting Started
- Enterprise Applications
- Object-Relational Mapping
- Collection Mapping
- Entity Manager
- Using Queries
- Query Language
- Criteria API
- Advanced Object-Relational Mapping
- Advanced Topics
- XML Mapping Files
- Packaging and Deployment
- Testing
- Migration
著者について
Merrick Schincariol is a senior engineer at Oracle and a reviewer of the EJB 3.0 specification. He has a bachelor's degree in computer science from Lakehead University in Canada and has more than six years of experience in the industry. He spent some time consulting in the pre-Java enterprise and business intelligence fields before moving on to write Java/J2EE applications. His experience with large-scale systems and data warehouse design gave him a mature and practiced perspective on enterprise software that later propelled him into doing EJB container implementation work. He was a lead engineer for Oracle's EJB 3.0 offering.
Jeremy Keith is a web developer living and working in Brighton, England. Working with the web consultancy firm Clearleft (Clearleft.com), he enjoys building accessible, elegant websites using the troika of web standards: XHTML, CSS, and the DOM. His online home is Adactio.com. Jeremy is also a member of the WebStandards.org, where he serves as joint leader of the DOM Scripting Task Force. When he's not building websites, Jeremy plays bouzouki in the alt.country band Salter Cane (SalterCane.com). He is also the creator and curator of one of the web's largest online communities dedicated to Irish traditional music, TheSession.org.