|
Complete Hibernate™ teaches students one of the most popular object-relational mapping frameworks for Java environments.
Object relational mapping in large enterprise applications is difficult. The task is so difficult that the problem of
storing and retrieving objects to a relational database has its own name - impedance mismatch.
In this class, students
are familiarized with object-relational mapping concepts and the various issues and options available in Java to address
object presistence. With these fundamentals, the course then explores the basics of Hibernate™ object persistence and
configuration. It also digs into the details of Hibernate™ mapping, queries, transactions, and concurrency. Not just a
class that focuses on theory, this course is loaded with practical labs and a section dedicated to advanced topics and
performance and practical best practices.
After taking this class, developers will be able to build faster, more flexible
and easier to maintain application persistence layers and overcome impedance mismatch with the Hibernate™ framework.
Course Outline
Introduction to Hibernate
- Topics
- What is Hibernate™ ?
- Relational Database Technology
- Accessing Relational Databases from Java
- Domain Models
- Comparing Object and Relational Models
- Identity Modeling
- Granularity of Objects and Tables
- Association Modeling
- Navigation
- Inheritance
- What is Object/Relational Mapping?
- Advantages of using an ORM Tool
- Architecture of Hibernate
- Hibernate™ API
- Extension Interfaces
- Hibernate™ Configuration
- Hibernate™ Mappings
- Hibernate™ Properties
- Hibernate™ XML Configuration Files
- Non-Managed and Managed Environments
- Configuration in a Non-Managed Environment
- Configuration in a Managed Environment
- Binding SessionFactory to JNDI
- A Simple Example
- Alternatives to Hibernate™
- EJB Entity Beans
- Hand-Coded Persistence Using JDBC
- Object-Oriented Databases
- Other ORM Tools
Basic Mappings
- Topics
- Creating the Domain Model
- Domain Model
- Domain Objects
- Hibernate™ Requirements
- Object Identity
- Primary Keys
- Natural Keys vs. Surrogate Keys
- Identifier Property
- Identifier Generators
- Hibernate™ Managed Identifiers
- Mapping Metadata
- Mapping Properties
- Property Access Strategies
- Derived Properties
- Preventing Insert/Update
- Using Database Schemas
- Quoted SQL Identifiers
- Specifying Java Packages
- Entity and Value Types
- Components
- Bi-Directional Components
- Other Component Details
- Association Mappings
- Many-to-One Association
- Inheritance Mapping Strategies
- Table per Concrete Class
- Table per Subclass
- Table per Class Hierarchy
Manipulating Persistent Objects
- Topics
- Object States
- Transient Objects
- Persistent Objects
- Detached Objects
- Object Identity
- Persisting a Transient Object
- Retrieving and Updating a Persistent Object
- Deleting a Persistent Object
- Updating a Detached Object
- Transitive Persistence
- Using save-update
- Differentiating Between Transient and Detached Objects
- HQL Queries
- Parameter Binding
- Pagination
- Named Queries
- Polymorphic Queries
- Restriction
- String Comparison
- Logical Operators
- Ordering the Results
- Join Queries
- Implicit Joins
- Where Clause Joins
- Criteria Queries
- Polymorphic Criteria Queries
- Restricting Criteria Queries
- Comparing Strings in Criteria Queries
- Using Logical Operators in Criteria Queries
- Ordering Results in Criteria Queries
- Using Joins in Criteria Queries
- Using Dot Notation to Get Component Properties
Advanced Mappings
- Topics
- One-to-One Associations
- Many-to-Many Associations
- Polymorphic Associations
- Entity vs. Value Types
- Built-in Mapping Types
- Using Mapping Types
- Custom Mapping Types
- Collections of Value Types
- Bag of Value Types
- List of Value Types
- Map of Value Types
- Collections of Components
- Sorting Collections
Transactions, Concurrency and Performance
- Topics
- Database Transactions
- JDBC and JTA Transactions
- Hibernate™ Transactions
- Flushing the Hibernate™ Session
- Isolation Issues
- Isolation Levels
- Configuring the Isolation Level
- Pessimistic Locking
- Application Transactions
- Application Transaction Isolation
- Managed Versioning
- Using Existing Properties to Implement Optimistic Locking
- Caching
- Hibernate™ Cache Architecture
- The First-Level Cache
- The Second-Level Cache
- Cache Concurrency Strategies
- Enabling the Second-Level Cache
- Cache Regions
- Specifying a Cache Provider
- Support for Cache Providers
- Explicitly Evicting Objects from the Second-Level Cache
- Fetching Strategies
- Fetching Strategies in Mappings - Single Point Associations
- Fetching Strategies in Mappings - Collections
- Fetching Strategies in Mappings - Batches
- Explicit Initialization of Lazily Loaded Objects
- Fetching Strategies in HQL Queries
- Fetching Strategies in Criteria Queries
- The N + 1 Selects Issue
- Report Queries - Projections
- Report Queries - Aggregation
- Report Queries - Grouping
Tools and Design Techniques
- Topics
- Generating the Database Schema
- Generating the Domain Model
- Using Middlegen
- Using XDoclet
- The Open Session in View Pattern
- Using a Natural Key
- Using a Composite Key
- Dealing with Database Triggers
Disclaimer:
Brand names and trademarks/trade names published herein are registered trademarks of other companies not affiliated with Alto Consulting and Training. Alto Consulting and Training is not an authorized dealer or affiliated with Red Hat or Sun Microsystems.
|