Online Hibernate Training

Hibernate ORM (Hibernate in short) is an object-relational mapping framework for the Java language. It provides a framework for mapping an object-oriented domain model to a relational database. Hibernate solves object-relational impedance mismatch problems by replacing direct, persistent database accesses with high-level object handling functions.

Understanding object/relational persistence

What is persistence?
Relational databases
Understanding SQL
Using SQL in Java
Persistence in object-oriented applications
 The paradigm mismatch
The problem of granularity
The problem of subtypes
The problem of identity
Problems relating to associations
The problem of object graph navigation
The cost of the mismatch
 Persistence layers and alternatives
Layered architecture
Hand-coding a persistence layer with SQL/JDBC
Using serialization
Considering EJB entity beans
Object-oriented database systems
Other options
Object/relational mapping
What is ORM?
Generic ORM problems
Why ORM?

Introducing and integrating Hibernate

“Hello World” with Hibernate
Understanding the architecture
The core interfaces
Callback interfaces
Types Extension interfaces
Basic configuration
Creating a SessionFactory
Configuration in non-managed environments
Configuration in managed environments
Advanced configuration settings
Using XML-based configuration
JNDI-bound SessionFactory
Java Management Extensions (JMX)

Mapping persistent classes

The CaveatEmptor application
Analyzing the business domain
The CaveatEmptor domain model
Implementing the domain model
Addressing leakage of concerns
Transparent and automated persistence
Writing POJOs
Implementing POJO associations
Adding logic to accessor methods
Defining the mapping metadata
Metadata in XML
Basic property and class mappings
Attribute-oriented programming
Manipulating metadata at runtime
Understanding object identity
Identity versus equality
Database identity with Hibernate
Choosing primary keys
Fine-grained object models
Entity and value types
Using components
Mapping class inheritance
Table per concrete class
Table per class hierarchy
Table per subclass
Choosing a strategy
Introducing associations
Managed associations?
The simplest possible association
Making the association bidirectional
A parent/child relationship

Working with persistent objects

The persistence lifecycle
Transient objects
Persistent objects
Detached objects
The scope of object identity
Outside the identity scope
Implementing equals() and hashCode()
The persistence manager
Making an object persistent
Updating the persistent state of a detached instance
Retrieving a persistent object
Updating a persistent object
Making a persistent object transient
Making a detached object transient
Using transitive persistence in Hibernate
Persistence by reachability
Cascading persistence with Hibernate
Managing auction categories
distinguishing between transient and detached instances
Retrieving objects
Retrieving objects by identifier
Introducing HQL
Query by criteria
Query by example Fetching strategies
Selecting a fetching strategy in mappings
Tuning object retrieval

Transactions, concurrency, and caching

Understanding database transactions
JDBC and JTA transactions
The Hibernate Transaction
API Flushing the Session
Understanding isolation levels
Choosing an isolation level
Setting an isolation level
Using pessimistic locking
Working with application transactions
Using managed versioning
Granularity of a Session
Other ways to implement optimistic locking
Caching theory and practice
Caching strategies and scopes
The Hibernate cache architecture
Caching in practice

Advanced mapping concepts

Understanding the Hibernate type system
Built-in mapping types
Using mapping types
Mapping collections of value types
Sets, bags, lists, and maps
Mapping entity associations
One-to-one associations Many-to-many associations
Mapping polymorphic associations
Polymorphic many-to-one associations
Polymorphic collections
Polymorphic associations and table-perconcrete-class

Retrieving objects efficiently

Executing queries
The query interfaces
Binding parameters
Using named queries
Basic queries for objects
The simplest query
Using aliases
Polymorphic queries
Comparison operators
String matching
Logical operators
Ordering query results
Joining associations
Hibernate join options
Fetching associations
Using aliases with joins
Using implicit joins
Theta-style joins
Comparing identifiers
Writing report queries
Projection Using aggregation Grouping
Restricting groups with having
Improving performance with report queries
Advanced query techniques
Dynamic queries
Collection filters
Native SQL queries
Optimizing object retrieval
Solving the n+ selects problem Using iterate()
queries Caching queries

Writing Hibernate applications

Designing layered applications
Using Hibernate in a servlet engine
Using Hibernate in an EJB container
Implementing application transactions
Approving a new auction
Doing it the hard way
Using detached persistent objects
Using a long session
Choosing an approach to application transactions
Handling special kinds of data
Legacy schemas and composite keys Audit logging

Using the toolset

Development processes
Top down
Bottom up
Middle out (metadata oriented)
Meet in the middle
Automatic schema generation
Preparing the mapping metadata
Creating the schema
Updating the schema
Generating POJO code
Adding meta-attributes
Generating finders
Configuring hbmjava
Running hbmjava
Existing schemas and Middlegen
Starting Middlegen
Restricting tables and relationships
Customizing the metadata generation
Generating hbmjava and XDoclet metadata
Setting value type attributes
Mapping entityassociations
Running XDoclet

Click for Personal Java Training Online by Java Tutor at