Monday, August 10, 2009

Hibernate concepts

Hibernate Objectives

* Understand the benefits of Hibernate
* Understand the Hibernate architecture
* Create Hibernate based applications
* Understand and use Hibernate mapping to map persistent objects to the database
* Understand and work with collections & associations
o Value and Entity Types
o Bidrectional and unidirectional
o 1-1, 1-N, N-N
* Use Hibernate's versioning support
* Map inheritance hierarchies using Hibernate
* Work with Hibernate queries, HQL, and Criteria
* Performance tune your Hibernate applications
* Understand Hibernate transaction support
* Understand the relationship between Hibernate and Java Persistence / EJB 3
* Use the new Hibernate annotations to do OR mapping

Hibernate Outline

* Introduction to Hibernate
o Issues with Persistence layers and Object-Relational Mapping (ORM)
o Hibernate Overview and Benefits
o Hibernate architecture overview
o POJO (Plain Old Java Object) Based Mapping
* Getting started with Hibernate quickly
o Overview of the Hibernate distribution
o Configuring Hibernate
+ hibernate.cfg.xml file
+ SessionFactory configuration
+ Connection properties, Database dialect
+ Configuration class, Session Interface
o "Hello World" Program for Hibernate
o Mapping a Class
+ Persistent Entity Class, Hibernate Mapping
+ File, Mapping the Entity Class
+ Primary keys: Id property, Generated Id
o Hibernate Type System
o Working with sessions and Persistent Objects
o Logging - log4j Overview and configuration for Hibernate
* Querying
o Inserting and Updating Entities
o HQL - Hibernate Query Language Overview
o The Query Interface
o Creating and working with queries
o Named Queries, Projection Queries, Aggregate Queries
* The Persistence Lifecycle
o Transaction Overview and Transactions in Hibernate
o Hibernate Transaction API (in Managed and Non-managed Environments)
o The lifecycle of managed objects
o Persistent, transient, and detached objects
o The Persistence (Session) Context (Lifespan, Relation to Managed Objects, Propagation)
o Contextual Sessions
o Synchronization to the Database
o The Session as cache
* Optimistic Locking / Versioning
o Detached Objects and Optimistic Locking
o Versioning overview and Using Versioning
o Locking Objects
* Relationships
o Object Relationship Overview
o Mapping Collections of Value Objects
o Entity Relationships: 1-N, N-1, N-N, 1-1
o Mapping Entity Relationships
o Uni and Bi-directional Relationships
o The Relationship "inverse"
o Cascading Over Relationships
o Queries Across Relationships (Lazy and Eager)
* Inheritance Mapping
o Entity Inheritance with Hibernate
o Table-per-class mapping
o Table per Subclass mapping
o Table per Concrete Class mapping
* Additional Querying Capabilities
o Projection Queries, Aggregate queries
o Bulk updates and deletes
o Native SQL Queries
o Query Filters
* The Criteria API
o Overview of the Criteria API
o Working Querying with the Criteria API
o Query by Example
* Hibernate and Java Persistence / EJB 3
o Overview of Java Persistence / EJB 3
o Relationship between Java Persistence and Hibernate
o Overview of Annotations
o Mapping Entities with Hibernate Annotations
o The EntityManager, Persistence Context and Persistence Unit
o Working with Transactions - EntityTransaction, Managed, and Unmanaged Environments
o Inserts and Updates
o JPQL - Java Persistence Query Language
o Versioning
o Relationships
* Advanced Topics
o Components and Multi-Table Mapping
o equals() and hashCode()
o Caching and Efficiency
o Design Considerations
* Conclusion

No comments:

Post a Comment