Introduction to Hibernate


Course Number: HIB-100

Duration: 3 days (19.5 hours)

Format: Live, hands-on

Hibernate Training Overview

Hibernate is a high-performance object/relational persistence and query service. In this class, experienced Java developers learn how to put the Hibernate engine to work within their applications.

Location and Pricing

Accelebrate offers instructor-led enterprise training for groups of 3 or more online or at your site. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for private corporate training on-site or online, please contact us.

In addition, some courses are available as live, online classes for individuals. See a schedule of online courses.

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 and associations
    • Value and Entity Types
    • Bidrectional and unidirectional
    • 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

Prerequisites

All attendees must have at least one year of full-time Java™ development experience and an excellent understanding of relational databases and SQL.

Outline

Expand All | Collapse All

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

Training Materials:

All Hibernate training students receive comprehensive courseware. 

Software Requirements:

  • Core 2 Duo or faster processor with at least 8 GB RAM
  • Any operating system that supports Java 1.8 or later
  • JDK 8 or later
  • The Java tool the students are likely to use after the class (Eclipse is recommended, but other tools are supported)
  • Other free software - please contact us if you have purchased this class


Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan