| Preface | | ix | |
| Part I. Hibernate in a Hurry |
| |
| | 3 | |
| Getting an Ant Distribution |
| | 3 | |
| | 5 | |
| Getting the Maven Tasks for Ant |
| | 6 | |
| Installing the Maven Tasks for Ant |
| | 8 | |
| Using the HSQLDB Database Engine |
| | 8 | |
| | 10 | |
| Setting Up a Project Hierarchy |
| | 12 | |
| | 25 | |
| Writing a Mapping Document |
| | 26 | |
| | 29 | |
| | 34 | |
| | 43 | |
| | 43 | |
| Creating Persistent Objects |
| | 46 | |
| Finding Persistent Objects |
| | 56 | |
| Better Ways to Build Queries |
| | 60 | |
| Collections and Associations |
| | 63 | |
| | 63 | |
| | 71 | |
| | 77 | |
| Using Bidirectional Associations |
| | 80 | |
| Working with Simpler Collections |
| | 84 | |
| | 87 | |
| Eager and Lazy Associations |
| | 87 | |
| | 90 | |
| Augmenting Associations in Collections |
| | 92 | |
| | 104 | |
| | 107 | |
| | 111 | |
| | 111 | |
| Defining a Persistent Enumerated Type |
| | 112 | |
| Using a Custom Type Mapping |
| | 114 | |
| Working with Persistent Enumerations |
| | 119 | |
| Building a Composite User Type |
| | 126 | |
| The Annotations Alternative |
| | 139 | |
| | 139 | |
| | 143 | |
| | 158 | |
| | 163 | |
| | 164 | |
| | 167 | |
| Projection and Aggregation with Criteria |
| | 168 | |
| Applying Criteria to Associations |
| | 173 | |
| | 175 | |
| Property-Oriented Criteria Factories |
| | 177 | |
| | 179 | |
| | 179 | |
| Selecting Properties and Pieces |
| | 184 | |
| | 188 | |
| Working with Aggregate Values |
| | 189 | |
| Writing Native SQL Queries |
| | 192 | |
| Part II. Playing Nice with Others |
| |
| Connecting Hibernate to MySQL |
| | 199 | |
| Setting Up a MySQL Database |
| | 199 | |
| | 200 | |
| | 201 | |
| | 205 | |
| Hibernate and Eclipse: Really Using the Hibernate Tools |
| | 209 | |
| Installing the Hibernate Tools in Eclipse |
| | 209 | |
| Creating a Hibernate Console Configuration |
| | 217 | |
| | 219 | |
| The Hibernate Console Perspective |
| | 222 | |
| | 230 | |
| | 236 | |
| | 239 | |
| | 239 | |
| | 242 | |
| Building, Testing, and Running a Project |
| | 243 | |
| Generating IDE Project Files using Maven |
| | 245 | |
| Generating Reports with Maven |
| | 247 | |
| A Maven Project Object Model |
| | 250 | |
| The Maven Build Lifecycle |
| | 260 | |
| Using the Maven Hibernate3 Plug-in |
| | 262 | |
| | 266 | |
| Put a Spring in your Step: Hibernate with Spring |
| | 269 | |
| | 269 | |
| Writing a Data Access Object |
| | 272 | |
| Creating an Application Context |
| | 281 | |
| | 285 | |
| The Finishing Touch: Stripes with Spring and Hilbernate |
| | 297 | |
| | 298 | |
| | 299 | |
| Create the Web Application |
| | 299 | |
| | 304 | |
| Dealing with Associations |
| | 317 | |
| Hibernate Types | | 327 | |
| The Criteria API | | 333 | |
| Hibernate SQL Dialects | | 341 | |
| Spring Transaction Support | | 343 | |
| Where to Go Next | | 347 | |