Home Page Icon
Home Page
Table of Contents for
Harnessing Hibernate
Close
Harnessing Hibernate
by Ryan Fowler, Timothy M. O'Brien, James Elliott
Harnessing Hibernate
A Note Regarding Supplemental Files
Preface
How to Use This Book
Font Conventions
On the Web Site
How to Contact Us
Acknowledgments
James Elliott
Ryan Fowler
Timothy O’Brien
I. Hibernate in a Hurry
1. Installation and Setup
Getting an Ant Distribution
Why do I care?
How do I do that?
Check Your Java Version
What just happened?
What about…
Getting the Maven Tasks for Ant
How do I do that?
Installing the Maven Tasks for Ant
Using the HSQLDB Database Engine
Why do I care?
How do I do that?
What about…
Using Hibernate Core
How do I do that?
Setting Up a Project Hierarchy
Why do I care?
How do I do that?
A quick test
What just happened?
What’s next?
Why didn’t it work?
2. Introduction to Mapping
Writing a Mapping Document
Why do I care?
How do I do that?
Generating Some Class
How do I do that?
Cooking Up a Schema
How do I do that?
What just happened?
What about…
3. Harnessing Hibernate
Configuring Hibernate
Creating Persistent Objects
How do I do that?
What just happened?
What about…
Finding Persistent Objects
How do I do that?
What just happened?
What about…
Better Ways to Build Queries
Why do I care?
How do I do that?
What about…
4. Collections and Associations
Mapping Collections
How do I do that?
Why didn’t it work?
What about…
What just happened?
Persisting Collections
How do I do that?
What just happened?
Retrieving Collections
Using Bidirectional Associations
Working with Simpler Collections
How do I do that?
5. Richer Associations
Eager and Lazy Associations
How do I do that?
What about…
My head hurts
Ordered Collections
How do I do that?
Augmenting Associations in Collections
How do I do that?
What just happened?
What about…
Lifecycle Associations
How do I do that?
Reflexive Associations
How do I do that?
6. Custom Value Types
Defining a User Type
How do I do that?
Defining a Persistent Enumerated Type
Using a Custom Type Mapping
How do I do that?
What about…
Working with Persistent Enumerations
How do I do that?
Not so fast!
What just happened?
Why didn’t it work?
Building a Composite User Type
How do I do that?
What about…
7. The Annotations Alternative
Hibernate Annotations
Why do I care?
How do I do that?
Why do I have to?
Annotating Model Objects
How do I do that?
Annotating Track
Annotating Album
Does it work?
An Alternate Approach
What now?
8. Criteria Queries
Using Simple Criteria
How do I do that?
What about…
Compounding Criteria
Projection and Aggregation with Criteria
How do I do that?
Applying Criteria to Associations
How do I do that?
What just happened?
Querying by Example
How do I do that?
Property-Oriented Criteria Factories
What about…
9. A Look at HQL
Writing HQL Queries
How do I do that?
What just happened?
What about…
Selecting Properties and Pieces
How do I do that?
What about…
Sorting
How do I do that?
Working with Aggregate Values
How do I do that?
What just happened?
Writing Native SQL Queries
How do I do that?
What about…
II. Playing Nice with Others
10. Connecting Hibernate to MySQL
Setting Up a MySQL Database
How do I do that?
Connecting to MySQL
Trying It Out
What just happened?
Looking at the Data
What about…
11. Hibernate and Eclipse: Really Using the Hibernate Tools
Installing the Hibernate Tools in Eclipse
How do I do that?
What went wrong?
Now what?
Creating a Hibernate Console Configuration
More Editing Support
But wait, there’s more!
The Hibernate Console Perspective
What about…
Code Generation
Mapping Diagrams
12. Maven in More Depth
What Is Maven?
Maven’s standard directory layout
Installing Maven
Building, Testing, and Running a Project
Generating IDE Project Files using Maven
Generating Reports with Maven
A Maven Project Object Model
Parent/child Project Object Models
The Maven Build Lifecycle
Using the Maven Hibernate3 Plug-in
Configuring the Hibernate3 plug-in
Generating Hibernate mapping documentation
Becoming a Maven Maven
13. Put a Spring in your Step: Hibernate with Spring
What Is Spring?
What is inversion of control?
Combining Spring and Hibernate
Adding the Spring framework as a project dependency
Writing a Data Access Object
What is a Data Access Object?
Why would I want to use a DAO?
Writing the ArtistDAO interface
Implementing the ArtistDAO interface
What HibernateDaoSupport provides
How do I do that?
Where are the other DAOs?
Creating an Application Context
Hibernate configuration properties
Putting It All Together
Transactions: the test interface
How do I activate the transactional annotation?
Adapting CreateTest, QueryTest, and AlbumTest
TestRunner: loading a Spring ApplicationContext
Running CreateTest, QueryTest, and AlbumTest
It worked! Now what?
14. The Finishing Touch: Stripes with Spring and Hibernate
Earn Your Stripes
DispatcherServlet
StripesFilter
ActionBeans
Views
Prepare Tomcat
Create the Web Application
What just happened?
Add Stripes
Write up an ActionBean
What just happened?
What’s next?
Dealing with Associations
Interceptors: a powerful way to extend stripes
A. Hibernate Types
Basic Types
Custom Value Types
“Any” Type Mappings
All Types
B. The Criteria API
The Criterion Factory
The Projection Factory
The Order Factory
The Property Factory
C. Hibernate SQL Dialects
Getting Fluent in the Local SQL
D. Spring Transaction Support
Using the Spring Framework’s Transactional Annotation
Transactional annotation attributes
Transaction propagation
Transaction isolation
Using a JTA Transaction Manager
E. Where to Go Next
Online Manuals
Books
Source Code
Dealing with Newer Releases
Getting Involved
Index
About the Authors
Colophon
Copyright
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
A Note Regarding Supplemental Files
Harnessing Hibernate
James Elliott
Timothy M. O’Brien
Ryan Fowler
Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset