• Decrease font size
  • Default font           size
  • Increase font size

Introduction to Hibernate

Print E-mail

Visit GogoTraining and Buy Introduction to Hibernate Self-paced Training Course Today!Training Description

Dashcourses has partnered with GogoTraining to bring you this Self-paced Course.

In this self-paced Introduction to Hibernate technical training course, JSP and servlet programmers will learn how to integrate their enterprise applications with the open-source Hibernate framework for persisting information to databases. Students will learn how the Hibernate architecture implements best practices in Web application Development for persisting information to databases.

Training Objectives

As a result of this training, students will be able to:

  • Install and configure the Hibernate product using XML.
  • Explain how Hibernate maps a database table or entity to a Java object.
  • Use Hibernate Query Language (HQL) to query and update database entities through Hibernate objects.
  • Map unidirectional and bi-directional relationships in Hibernate.
  • Implement inheritance in Hibernate mapping.
  • Control transactions in Hibernate.
  • Control caching and perform other advanced efficiency optimizations within Hibernate.

Prerequisites

  • Familiarity with Java programming, Servlets programming, JSP and JavaBeans; familiarity with Web page development (HTML and XML).
  • Minimum software requirements: Java Enterprise Edition Software Development Kit (Java EE SDK). JavaServer Faces (JSF) visual development environment, such as Eclipse, NetBeans or Sun Java Studio Creator. Apache Tomcat. Hibernate development framework (downloadable from www.hibernate.org) Optional JDBC-compliant relational database, such as Oracle, MySQL or Microsoft SQL Server.
  • Minimum hardware requirements: Pentium at 1.5 GHz, 1 GB RAM; 5 GBfree hard disk space before installation. Internet access.

Training Outline

Module 00: Course Introduction

Module 01: 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

Module 02: 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

Module 03: Querying in Hibernate

  • Inserting and Updating Entities
  • HQL - Hibernate Query Language Overview
  • The Query Interface
  • Creating and Working with Queries
  • Named Queries, Projection Queries, Aggregate Queries

Module 04: The Hibernate 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

Module 05: Optimistic Locking and Versioning in Hibernate

  • Detached Objects and Optimistic Locking
  • Versioning Overview and Using Versioning
  • Locking Objects

Module06: Relationships in Hibernate

  • 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 "Inverse" Relationship
  • Cascading Over Relationships
  • Queries Across Relationships (Lazy and Eager)

Module 07: Inheritance Mapping in Hibernate

  • Entity Inheritance with Hibernate
  • Table-per-Class Mapping
  • Table-per-Subclass Mapping
  • Table-per-Concrete Class Mapping

Module 08: Additional Querying Capabilities of Hibernate

  • Projection Queries, Aggregate Queries
  • Bulk Updates and Deletes
  • Native SQL Queries
  • Query Filters

Module 09: The Hibernate Criteria API

  • Overview of the Criteria API
  • Working Querying with the Criteria API
  • Query by Example

Module 10: 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

Module 11: Hibernate and Transactions

  • Working with Transactions - EntityTransaction, Managed and Unmanaged Environments
  • Inserts and Updates
  • JPQL - Java Persistence Query Language
  • Versioning
  • Relationships

Module 12: Advanced Hibernate Topics

  • Components and Multi-Table Mapping
  • equals() and hashCode()
  • Caching and Efficiency
  • Design Considerations

Module 13: Review and Summary