HomeTrainingCoursewareList of CoursesContact UsSearch
Call (605) 391-2110 to speak with a sales representative, or email us at sales@javalicense.com.
Course Title: Fast Track to Hibernate
Course Length: 3 Days
Course Number: Java401
Delivery: Instructor-led, On-Site
Audience: Java developers who need to access databases using Hibernate.
Description: With Hibernate, you can create objects that are true to your Object-Oriented designs, then persist them to your database. This course covers all you need to know to map objects to relational data as well as how to perform queries and updates in various ways. It covers all of the important concepts necessary to access and update data stored in relational databases. It includes an extensive series of labs to exercise all major capabilities.
Course Outline:

Hibernate Overview

  • The Issues with Persistence Layers
  • Object-Relational Mapping (ORM) Issues
  • Issues with JDBC Alone
  • Hibernate Benefits
  • Hibernate Environments
  • Hibernate Architecture
  • More Detailed Architecture
  • Using Hibernate

  • Acquiring Hibernate
  • Using Hibernate
  • Configuring Hibernate
  • hibernate.cfg.xml Elements
  • SessionFactory Configuration
  • SessionFactory Configuration Properties
  • The Configuration Class
  • The SessionFactory Interface
  • SessionFactory API
  • The Session Interface
  • Sessions and Transactions
  • Mapping a Simple Class

  • Persistent Entity Classes
  • Persistent Classes
  • The Event Class
  • The id Property
  • The Hibernate Mapping File
  • The <hibernate-mapping> Element
  • The <class> Element
  • The EVENTS Table
  • Mapping the id Property with <id>
  • More About Primary Keys
  • Generating the id Value
  • Mapping Properties with <property>
  • Hibernate Mapping Types
  • Common Hibernate Type Mappings
  • Filed Access or Property Access
  • The Mapping File
  • Hibernate Sessions
  • The Session Interface
  • Retrieving Persistent Objects
  • Logging

  • Hibernate.show_sql
  • Apache Log4J
  • Hibernate log4j.properties File
  • The log4j.properties File
  • Modifying log4j.properties for Hibernate
  • Hibernate Logging Categories
  • Appendix – Log4J

  • Apache Log4J
  • log4j Logres
  • Logger Hierarchy
  • Logger Levels
  • Appenders
  • Aprender Additivity
  • Layout
  • log4j Configuration File
  • Patternlayout
  • Multiple Layouts
  • Some log4j Appenders
  • Inserting and Updating

  • Hibernate Query Language
  • HQL Basics
  • Executing a Query
  • Other common Query Methods
  • Where Clause/Restriction
  • HQL Operators and Expressions
  • Query Parameters
  • Using Query Parameters
  • Named Queries
  • Projection Queries
  • Projection Queries Returning Tuples
  • Additional Query Capabilities
  • Aggregate Functions
  • Transaction Definition

  • Transaction Lifecycle
  • Transactions Modularize Systems
  • Transactions Clarify Systems
  • Hibernate and Transactions

  • Hibernate and Transactions
  • Hibernate Transaction Demarcation
  • Working with Transactions
  • The Hibernate Transaction API
  • Working in a Managed Environment
  • The Persistence Lifecycle

  • Hibernate Object States
  • Transient and Persistent State
  • Detached and Removed State
  • Hibernate Object States and Transitions
  • The Persistence Context
  • Session/Persistence Context Lifespan
  • Session-per-Request
  • Session Propagation
  • First – Acquiring a SessionFactory Instance
  • Contextual Session
  • Using Contextual Sessions
  • What is the “Current” Context
  • Contextual Session Scope
  • The Persistence context as Cache
  • Synchronization to the Database
  • Flushing the Session
  • Persistence Context and Object Identity
  • Yes, It’s Complicated
  • Versioning and Optimistic Locking

  • Detached Objects and Optimistic Locking
  • Using a Detached Instance
  • Optimistic Locking and Versioning
  • Version Property in Java Class
  • Version Element in Mapping File
  • Automatic Version Maintenance
  • Updating a Detached Instance
  • session.saveorupdate()
  • The unsaved-value Attribute
  • Locking Objects
  • Lock Modes
  • Relationships Overview

  • Object Relationships
  • Characteristics of Relationships
  • Directionality
  • Characteristics of Relationships
  • Collections of Value Objects

  • Collections of Values
  • Modeling a Set of Values
  • Mapping the Set of Values
  • Using a Set of Values
  • More on the Java Collection Type
  • Using the Java Collection Type
  • Modeling a List of Values
  • Mapping a List of Values
  • Sorted and Ordered Collections
  • Collections of Components
  • Mapping Collections of Components
  • Mapping Entity Relationships

  • Unidirectional Many-To-One Relationship
  • The Table Structure – Many-To-One
  • Mapping the Relationship
  • Using the Relationship
  • Bidirectional One-To-Many Relationship
  • Defining the One-To-Many Relationship
  • Mapping the One-To-Many Relationship
  • More on the Inverse Side
  • Cascading Operations
  • Transitive Persistence
  • The Cascade Attribute
  • Cascade Choices
  • Choosing Cascade Options
  • Mapping Inheritance

  • Inheritance
  • Entity Inheritance
  • Single-Table Strategy
  • Class Definitions for Single-Table
  • Mapping for Single-Table
  • Single-Table: Pros and Cons
  • Table per Subclass (Joined Subclass)
  • Mapping for Table per Subclass
  • Joined: Pros and Cons
  • Table per Concrete Class
  • More on Querying

  • Projection Queries
  • Aggregate Queries
  • Bulk Update and Delete
  • Executing Bulk Operations
  • Native SQL Queries
  • Refining SQL Queries
  • Retrieving Entities with SQL Queries
  • Filters

  • Hibernate Filters
  • Defining and Attaching Filters
  • Using a Filter
  • Mapping a Filter to a Set
  • Collection Filters
  • Criteria

  • Restrictions – Narrowing the Result Set
  • Restrictions Methods
  • Navigating Associations
  • Eager Fetching
  • Query by Example
  • Refining the Example
  • Additional Capabilities
  • JPA Overview

  • Java Persistence API Overview
  • Java Persistence Environments
  • Hibernate and JPA
  • Mapping a Simple Class

  • Entity Classes
  • Event Entity Mapped with JPA
  • The Entity Declaration
  • The Event Class
  • The id Property
  • Mapping Properties
  • Basic Mapping Types
  • Entity Manager and Persistence Context

  • The Entity Manager & Persistent Context
  • Persistence Unit
  • persistence.xml
  • Acquiring an EntityManager
  • Working with Transactions
  • Retrieving Persistent Objects
  • Inserts and Queries

  • Persisting a New Entity
  • Java Persistence Query Language
  • Executing a Query
  • WHERE Clause and Query Parameters
  • Named Queries
  • Version Property in Java Class
  • Versioned Class and Detached Objects
  • Relationships

  • JPA Support for Relationships
  • Mapping the Many-To-One Relationship
  • Mapping the One-To-Many Relationship
  • Loading and Cascading
  • Queries Across Relationships
  • Inheritance
  • Entity Definitions for Single-Table
  • Entity Definitions for Joined
  • Components and Multi-Table Mapping

  • Component Overview
  • Mapping a Component
  • Multi-Table Mapping
  • equals() and hashCode()

  • Defining equals() and hashCode()
  • Redefining equals()
  • Caching

  • Second-Level Cache
  • Data Appropriate for Caching
  • Cache Providers
  • Configuring Caching
  • Concurrency Strategies
  • Managing the Caches
  • Design Considerations

  • Long Conversations
  • Session-per-Conversation
  • Problems with Web Applications
  • Open Session in View Pattern
  • Query Efficiency Techniques
  • Beware of N+1 Select Issue
  • Prefetching Data in Batches
  • Data Acces Object (DAO)
  • Hibernate Toolset

  • Optional – Hibernate Tools
  • Install Hibernate Tools
  • Design Mode for Config Files
  • Hibernate Console Configuration
  • Hibernate Console Perspective
  • Hibernate Configuration View
  • Class Diagram
  • HQL Editor
  • Query Results
  • Properties View
  • SQL Preview
  • Other Capabilities
  • JLicense, Inc. Copyright 2007. This site runs on a Tomcat server behind Apache's httpd Web server and uses JavaServer Pages, JavaServer Faces, JBoss RichFaces, and Ajax.