Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this

Table Of Contents

Hibernate Features
Application Architecture
Another View
Example of Persisting an Object
Example of Retrieving an Object
Using Named Parameters in Query
Exercise 1
Project Configuration for Hibernate
Where to Get Hibernate
Required Hibernate Libraries
Create a Hibernate Library in Eclipse
Add Library or jar for Database Driver
hibernate.cfg.xml for MySQL
XML Syntax, 1
XML Syntax, 2
Sample log4j.properties
Exercise 2
Create the Location class
Write the Location class
Hibernate can access private methods
Hibernate can access private data, too
Schema to create Locations table
O-R Mapping for the Location class
Mapping File Location.hbm.xml
Mapping File Explained
Attribute Mapping: <property .../>
What you have so far
HibernateUtil: a Session Factory (1)
HibernateUtil: a Session Factory (2)
HibernateUtil: a Session Factory (3)
Exercise 3
Getting a Unique Result
Mapping a Class with Associations
O-R Mapping of n-to-1 Associations
Mapping for Event (Event.hbm.xml)
Test: Save an Event
Did you get an Error?
Persisting the Event location
Test: Retrieve an Event
Lazy Instances and Proxies
Two Solutions
Creating a Component for Address
Organizing your Work
A DAO for the Location class
Java code for Simple LocationDao
The core of findById( ) - use "load"
The details of findById( )
The core of findByName( ) - "query"
Details of findByName( )
The core of save( ) - "saveOrUpdate"
Details of save
The core of delete( ) - "delete"
Redundant Code
Factor out Redundant Code
Duplicate Code Between DAO
Apply the Layer Superclass Pattern
Hibernate Query Language (HQL)
HQL example
Many-to-one Associations
Event.hbm.xml Mapping File
Cascading Save & Update
Learning Hibernate
Hibernate Tools
0 of .
Results for:
No results containing your search query
P. 1
5 Hibernate

5 Hibernate

Ratings: (0)|Views: 1 |Likes:
Published by Deepak Dewani

More info:

Published by: Deepak Dewani on Jun 09, 2013
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 4 to 33 are not shown in this preview.
You're Reading a Free Preview
Pages 37 to 74 are not shown in this preview.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->