JPA Programming with the Hibernate® ORM: Training Course Outline — About Objects, Inc.

Need more info? Call now.

703-251-4474

Courses — About Objects, Inc.

JPA Programming with the Hibernate® ORM

Course Outline

1. Introduction to the Hibernate ORM

  • What is Hibernate?
    • What is Object-Relational Mapping?
    • Advantages of an ORM
    • Strengths and weaknesses
    • Hibernate vs. competing ORMs
  • History of Hibernate
  • Future Direction

2. Java Persistence Architecture (JPA)

  • EJB 3.0 and the JPA Specification
  • Hibernate JPA Conformance
    • Java Persistence Providers
    • Annotations
    • Hibernate EntityManager
  • Why Does JPA Matter?

3. Overview of Facilities

  • Mapping Strategies
    • Horizontal, vertical, union
  • Object Support
    • In-memory objects and caching
    • Object states (persistent, detached, transient)
    • Object-based CRUD operations
    • Object Identity
    • Unique key generation
  • Managing Concurrency
    • Transactions
    • Locking strategies
  • Managing Relationships
    • Cascading
    • Maintaining referential integrity
  • Filters and Interceptors
  • Validator
  • Query Support
  • Performance Optimization
    • Lazy fetching
    • Second-level cache

4. Getting Started

  • Required JARs
  • Mapping files
  • hibernate.cfg.xml
    • Dialect
    • Connection pooling
    • Sessions and transactions

5. O-R Mapping

  • Models
    • Object Model
    • Data Model
    • Mapping between representations
    • Data conversions
    • Potential impedance mismatches
  • Comparison with JDBC
  • Examples
    • JavaBeans
    • Tables and mappings

6. O-R Mapping with Hibernate

  • Hibernate Mapping Model
  • HBM files
  • Using XDoclet
  • Using Annotations

7. Mapping Object Graphs

  • Object Identity
    • Identifiers and primary keys
    • Compound keys
    • Generating unique ids
  • Properties
  • Locking Strategies
    • Pessimistic
    • Optimistic
    • When to use pessimistic locks
  • Optimistic Locking Techniques
    • Snapshots
    • Version property
    • Timestamp property

8. Relationships

  • Inheritance
  • Cardinality
    • To-one
    • To-many
  • Inverse relationships
    • Collections
    • Bi-directional
    • Sorted
    • Indexed

9. Datatypes

  • Built-in Types
  • Custom Types
  • Creating a custom type
  • Mapping custom types to the DB
  • Dependent objects
    • Fine-grained Queries
  • Hibernate Query Language
    • Parameter substitution
    • Performance considerations
    • Fetching across relationships
    • Inner and outer joins
    • Subqueries
    • Aggregates and expressions
  • Native SQL Queries
    • Specifying what to bring back
    • Getting objects from native SQL
  • Criteria Queries
    • Query by example
    • Building criteria queries

10. Advanced Queries

  • Grouping Results
  • Ordering Results
  • Polymorphic Queries
  • More Queries
    • Named Queries
    • Custom SQL for Loading, Updating, Deleting and Creating
    • Performance Tips

11. Concurrency and Transactions

  • Unit of Work Concept
  • Application Transactions
  • Environment & Transactions
    • Non-Managed Environment
    • JTA Environment
    • Fully Managed Environment
    • Session Beans and Hibernate

12. Testing Hibernate Code and Meta-Data

  • DBUnit
  • TestNG