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

Need more info? Call now.

703-251-4474

Courses — About Objects, Inc.

JPA Programming with the Hibernate® ORM

Duration:

3 Days

Price:

$1,750


Here's What You'll Learn:

  • Fully understand the Hibernate architecture
  • Gain proficiency programming with Hibernate
  • Learn to configure object-relational mappings with XML and annotations
  • Gain hands-on familiarity with JPA-compliant APIs
  • Work with Hibernate transactions and locking to manage concurrency
  • Master basic and advanced Hibernate queries with HQL and Criteria APIs
  • Learn to model and manage various relationship types
  • Understand how to persist and retrieve complex object graphs
  • Know and understand major integration points

Gain comprehensive insight into the Hibernate 3.x ORM (Object-Relational Mapping) framework and its implementation of the JPA (Java Persistence Architecture) specification in this fast-paced, hands-on course. You'll learn basic and advanced techniques that will help you fully exploit the inherent power of ORM frameworks while maximizing portability. Carefully crafted lab exercises will help you get proficient quickly with a broad range of features.

You'll learn how to configure and manage persistence for complex Java objects, and how to apply numerous performance- and productivity-enhancing techniques. You'll also get insight into common pitfalls that will help you avoid common design and coding errors, and a solid understanding of the best techniques to use to address a given class of problems.

This course will also show you how to apply proper O-R modeling techniques to the business domain, while leveraging tricks of the trade to solve real-world business problems. It addresses real-world design and coding issues that you're likely to face and shows common solutions. As you gain detailed knowledge and hands-on practice with key Hibernate ORM facilities, you'll learn how to select mechanisms that are appropriate to the problem at hand, such as when and how to get ‘down to the metal’ to execute native SQL queries and stored procedures.

Who Should Take This Course

This course is for you if you are an experienced Java developer (or at a minimum, have taken Java Programming or the equivalent) are familiar with SQL and basic persistence concepts, and want to learn to use a JPA-compliant object-relational mapping framework. An understanding of ORM principles is helpful, but not required.

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

Links

For additional information on the Hibernate ORM, please visit:

The Hibernate project website: http://www.hibernate.org/
Wikipedia entry on Hibernate: http://en.wikipedia.org/wiki/Hibernate_(Java)