

Harnessing Hibernate (e-book)



Harnessing Hibernate (e-book) - Najlepsze oferty
Harnessing Hibernate (e-book) - Opis
Harnessing Hibernate is an ideal introduction to the popular framework that lets Java developers work with information from a relational database easily and efficiently. Databases are a very different world than Java objects, and they often involve people with different skills and specializations. With Hibernate, bridging these two worlds is significantly easier, and with this book, you can get up to speed with Hibernate quickly.Rather than present you with another reference, Harnessing Hibernate lets you explore the system, from download and configuration through a series of projects that demonstrate how to accomplish a variety of practical goals. The new edition of this concise guide walks you through Hibernate's primary features, which include mapping from Java classes to database tables, and from Java data types to SQL data types. You will also learn about Hibernate's data query and retrieval facilities, and much more.By reading and following along with the examples, you can get your own Hibernate environment set up quickly and start using it for real-world tasks right away. Harnessing Hibernate teaches you how to:Perform Object/Relational mappingWork with persistent data from Java codeWork with groups and relationships between objectsExtend Hibernate's rich type support for your own needsSimplify query creation using criteria and examplesUse the Hibernate Query Language (HQL) and understand how it differs from SQLUse Hibernate in conjunction with SpringUse Hibernate in conjunction with other packages, such as the Stripes web framework and the Eclipse IDEOnce you're (...) więcej past the first few chapters, you can jump to topics that you find particularly interesting or relevant. All background material and explanations of how Hibernate works and why is in the service of a focused task. Source code can be downloaded from the book's website.If using SQL is an uncomfortable chore, Harnessing Hibernate offers you an effective and trouble-free method for working with the information you store in your applications. Spis treści:Harnessing Hibernate
SPECIAL OFFER: Upgrade this ebook with OReilly
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 OBrien
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?
Whats next?
Why didnt 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 didnt 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 didnt 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, theres more!
The Hibernate Console Perspective
What about
Code Generation
Mapping Diagrams
12. Maven in More Depth
What Is Maven?
Mavens 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?
Whats 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 Frameworks 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
SPECIAL OFFER: Upgrade this ebook with OReilly mniej
Harnessing Hibernate (e-book) - Opinie i recenzje
Na liście znajdują się opinie, które zostały zweryfikowane (potwierdzone zakupem) i oznaczone są one zielonym znakiem Zaufanych Opinii. Opinie niezweryfikowane nie posiadają wskazanego oznaczenia.