rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9781590595114

Pro Hibernate 3

by
  • ISBN13:

    9781590595114

  • ISBN10:

    1590595114

  • Format: Paperback
  • Copyright: 2005-07-04
  • Publisher: Apress
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99 Save up to $30.59
  • Buy New
    $44.95
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-3 BUSINESS DAYS

Summary

This book provides current, up-to-date information about Hibernate 3 that programmers can't get anywhere else. Not only is it the first book to cover Hibernate 3 and all of the new features, it also provides an introduction to the latest version of this apparent established standard for object relational persistence in the Java world. Linwood and Minter discuss the new Hibernate 3 persistence layer and share design tips and best practices-not just the "how to" use parts of Hibernate, but how to take a step back and solve problems. They also approach Hibernate as software developers who use it and share knowledge, rather than as documenters of a project they worked on. This book is appropriate for programmers experienced in using Java with databases but inexperienced in Hibernate. It also can be useful to programmers who have some familiarity with Hibernate 2 and want to learn the nuances of version 3.

Table of Contents

About the Authors xiii
About the Technical Reviewer xv
Acknowledgments xvii
Introduction xix
PART 1 Hibernate 3 Primer
CHAPTER 1 An Introduction to Hibernate 3
3(10)
Plain Old Java Objects (POJOs)
4(1)
Origins of Hibernate and Object Relational Mapping
5(3)
EJBs As a Persistence Solution
7(1)
Hibernate As a Persistence Solution
7(1)
A Hibernate Hello World Example
8(1)
Mappings
9(1)
Database Generation
10(1)
Bootstrapping Your Configuration
10(2)
The Relationship of Hibernate 3 with EJB3
12(1)
Summary
12(1)
CHAPTER 2 Integrating and Configuring Hibernate
13(14)
Integrating Hibernate with Your Java Application
13(1)
Deploying Hibernate
14(2)
Required Libraries for Running Hibernate 3
14(1)
Enterprise JavaBeans 3
15(1)
Java Management Extensions (JMX) and Hibernate
15(1)
Hibernate Configuration
16(7)
Hibernate Properties
16(4)
XML Configuration
20(1)
Mapping Documents
21(1)
Naming Strategy
22(1)
Using a Container-Managed Data Source
23(1)
The Session Factory
23(1)
SQL Dialects
24(2)
Database Independence
26(1)
Summary
26(1)
CHAPTER 3 Building a Simple Application
27(38)
Install the Tools
27(4)
Hibernate 3
27(1)
HSQL 1.7.3.3
27(2)
Ant 1.6.2
29(2)
Create a Hibernate Configuration File
31(2)
Run the Message of the Day Example
33(5)
Persisting Multiple Objects
38(1)
Creating Persistence Classes
39(5)
Creating the Object Mappings
44(3)
Creating the Tables
47(2)
Sessions
49(3)
The Session and Related Objects
49(1)
Using the Session
50(2)
Building Data Access Objects (DAOs)
52(7)
The Example Client
59(4)
Summary
63(2)
CHAPTER 4 Using Annotations with Hibernate
65(20)
Creating Hibernate Mappings with Annotations
65(12)
Using Annotations in Your Application
67(1)
Introducing the Hibernate Annotations
67(1)
Entity Beans with @Entity
68(1)
Primary Keys with @Id
69(1)
Database Table Mapping with @Table and @SecondaryTable
70(1)
Field Persistence with @Basic and @Transient
71(1)
Object-Relational Mapping Details with @Column
71(1)
Modelling Relationships with Annotations
72(3)
Inheritance
75(1)
Using the Annotated Classes in Your Hibernate Configuration
76(1)
Code Listings
77(4)
Summary
81(4)
PART 2 Hibernate 3 Reference
CHAPTER 5 The Persistence Lifecycle
85(8)
Introduction to the Lifecycle
85(1)
Saving Objects
86(1)
Object Equality and Identity
86(1)
Loading Objects
87(2)
Refreshing Objects
89(1)
Updating Objects
89(1)
Deleting Objects
90(1)
Cascading Operations
91(1)
Querying Objects
92(1)
EJB3/JSR 220 Persistence API
92(1)
Summary
92(1)
CHAPTER 6 Creating Mappings
93(38)
Hibernate Types
93(2)
Entities
93(1)
Components
93(1)
Values
94(1)
The Anatomy of a Mapping File
95(18)
The Hibernate-Mapping Element
95(2)
The Class Element
97(3)
The Id Element
100(2)
The Property Element
102(1)
The Component Element
103(1)
The One-to-One Element
104(2)
The Many-to-One Element
106(1)
The Collection Elements
107(6)
Mapping Simple Classes
113(2)
Mapping Composition
115(3)
Mapping Other Associations
118(3)
Mapping Collections
121(2)
Mapping Inheritance Relationships
123(4)
One Table per Concrete Class
124(1)
One Table per Subclass
125(1)
One Table per Class Hierarchy
126(1)
More Exotic Mappings
127(2)
Any
128(1)
Array
128(1)
Join
128(1)
Dynamic Component
128(1)
Summary
129(2)
CHAPTER 7 Querying Objects with Criteria
131(14)
Using the Criteria Query API
131(13)
Using Restrictions with Criteria
135(3)
Paging Through the Result Set
138(1)
Obtaining a Unique Result
139(1)
Sorting the Query's Results
139(1)
Associations
140(1)
Distinct Results
141(1)
Projections and Aggregates
141(2)
Query By Example (QBE)
143(1)
Summary
144(1)
CHAPTER 8 Querying with HQL and SQL
145(14)
Hibernate Query Language
145(1)
First Example with HQL
146(1)
Logging the Underlying SQL
147(1)
Commenting the Generated SQL
148(1)
From Clause and Aliases
148(1)
Select Clause and Projection
149(1)
Using Restrictions with HQL
149(1)
Using Named Parameters
150(1)
Paging Through the Result Set
151(1)
Obtaining a Unique Result
152(1)
Sorting Your Results with Order By
152(1)
Associations
153(1)
Aggregate Methods
153(1)
Bulk Updates and Deletes with HQL
154(1)
Named Queries for HQL and SQL
155(2)
Using Native SQL
157(1)
Summary
158(1)
CHAPTER 9 Using the Session
159(16)
Sessions
159(2)
Transactions and Locking
161(9)
Transactions
161(2)
Locking
163(1)
Deadlocks
164(6)
Caching
170(3)
Threads
173(1)
Summary
173(2)
CHAPTER 10 Design Considerations with Hibernate 3
175(14)
Application Requirements
175(1)
Designing the Object Model
176(6)
Designing the POJOs
176(4)
Designing our DAOs
180(2)
Mapping with Hibernate
182(2)
Creating the Database Schema
184(2)
The Java Application
186(1)
Summary
187(2)
CHAPTER 11 Events and Interceptors
189(14)
Interceptors
189(8)
An Example Interceptor
191(6)
Events
197(4)
An Example Event Listener
199(2)
Summary
201(2)
CHAPTER 12 Hibernate Filters
203(10)
Where to Use Filters
203(1)
Defining Filters
204(1)
Using Filters in Your Application
205(1)
Basic Filtering Example
205(6)
Summary
211(2)
CHAPTER 13 Fitting Hibernate into the Existing Environment
213(10)
Limitations of Hibernate
213(1)
Hand-Rolled SQL
214(5)
Using a Direct Mapping
214(2)
Using a View
216(1)
Putting SQL into a Mapping
217(2)
Invoking Stored Procedures
219(2)
Replacing JDBC Calls in Existing Code
221(1)
Summary
222(1)
CHAPTER 14 Upgrading from Hibernate 2
223(6)
Package and DTD Changes
223(1)
New Features and Support for Old Ones
224(2)
Changes and Deprecated Features
225(1)
Additions
226(1)
Changes to Tools and Libraries
226(1)
Changes with Java 5
227(1)
Summary
227(2)
INDEX 229

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program