Hibernate and JPA

Try for free!

Subscribe and stream all our courses
from just USD30.00 per month
Start my free trial

Hibernate and JPA

Hibernate 4 Hibernate 5

featuring HQL, JPQL, Optimistic and Pessimistic Locking, Lazy Initialisation, Detached Objects and Performance

contains over 23 hours of video - equivalent to 5 days of live training.

  • This Hibernate and JPA training course takes you through all of the major features of Hibernate.
  • The course is fully practical, and is essentially a 23 hour pair programming session. You will develop production standard code, from scratch in your own IDE.
  • The Hibernate Training starts from the absolute basics, and takes you to a professional standard.
  • The JPA Training explains how Hibernate became a Java Standard, and with small changes to your code, you can change which implementation of JPA you work with.
  • The course is written using Hibernate 4.
  • The course is valid for all recent versions of Hibernate through to and including Hibernate 5 - there are only minor changes in relation to the fundamentals.
You will need some Java programming knowledge - you will need to be able to create classes and objects, and understand the basic syntax.

No database knowledge is required as an overview of SQL is given.

Contents

Having problems? check the errata

Introduction 23m 55s

A general overview of Hibernate - why would you use it?

Preview

Getting Started 60m 52s

We set up your development environment and install Hibernate. Also, an overview of SQL if you need it.

Preview

Persisting Objects 31m 24s

How to change a plain Java class into a persitable class.

Watch

Configuring Hibernate 40m 33s

How to configure Hibernate, including the hibernate.cfg.xml file

Watch

Manipulating Objects 36m 39s

How to update and delete objects.

Watch

More on Mapping 47m 54s

More options when you are mapping your classes - @Table, @Column annotations and the difference between field and property access.

Watch

Crashes and Logging 22m 17s

How to handle exceptions properly in Hibernate. We also configure log4j to give detailed information that will be useful later.

Watch

Relationships 41m 31s

We create a Many-to-One relationship and study how this affects the database.

Preview

Collections 56m 8s

We now switch to collections - Sets, Lists and Maps and see how to handle a One-To-Many relationship.

Watch

Bi Directional Relationships 32m 23s

One of the biggest mismatches - relations on a database are bidirectional. If you want the same in the Java, you have to work hard!

Watch

Many to Many Relationships 28m 23s

This short chapter is followed by a major coding exercise.

Watch

equals and hashCode 40m 1s

This is standard Java, but extremely important with databases. We'll also see that autoincrement IDs are not a good choice for implementing equality.

Watch

XML Mappings 46m 35s

Optional chapter - only needed if you are using the legacy XML coding style.

Watch

Java Persistence API 47m 4s

The JPA is a standardised version of Hibernate - see the differences. We will use JPA for the rest of the course.

Watch

Cascades 28m 0s

Cascades can reduce the amount of persistence code you write.

Watch

Embedding Objects 53m 17s

How to use the @Embed and @Embeddable annotations.

Watch

Queries - Part One 43m 38s

How to use the HQL and JPQL.

Watch

Queries - Part Two 45m 22s

More on HQL and JPQL.

Watch

Queries - Part Three 48m 21s

Even more on HQL and JPQL!

Watch

Criteria API - Part One 38m 36s

How to use the Criteria API in the Classic Hibernate (ie using Sessions).

Watch

Criteria API - Part Two 50m 58s

JPA2 also has a criteria API. Full details, including the TypeSafe API.

Watch

Inheritance 64m 14s

Three different strategies for handling inheritance - "Single Table", "Joined Table" and "Class per Table".

Watch

Detaching and Merging 52m 40s

What is detaching - and how to use the merge() method. Also covers the classic versions of update() and saveOrUpdate()

Watch

Optimistic Locking and Versioning 41m 0s

What is optimistic locking? We see that Hibernate can version objects to prevent concurrent database changes affecting your business process.

Watch

Pessimistic Locking 37m 58s

These are real database locks and we explain when they need to be used. Also, the difference between PESSIMISTIC_READ and PESSIMISTIC_WRITE.

Watch

Lazy Initialisation 52m 14s

This is Hibernate's biggest performance optimisation. We see how you can avoid the LazyInitializationException.

Watch

Tuning Performance 43m 8s

More options for performance tuning, include Batch Fetching.

Watch

First Level Cache 39m 6s

Everyone needs to understand the First Level Cache. Full details in this chapter.

Watch

Second Level Caching 80m 59s

An optional chapter: we configure EhCache as a second level to tune performance.

Watch

Web Applications 78m 27s

We now look at a full application that uses JPA and Hibernate.

Watch

Spring Applications 44m 43s

How does Spring help with Hibernate? (Nb you need to have studied the previous chapter before this one).

Watch

EJB Applications 51m 51s

If you're using JavaEE with an application server, then this chapter shows how to integrate JPA with that. We use Glassfish as an example.

Watch

Course Review 22m 6s

The best books on the market, where to go from here and a few things we missed!

Watch

Bonus Chapter - Isolations 17m 58s

This is a short extract from our Spring Fundamentals course, where we cover Isolation levels. This may be of interest if you want to explore locking in a little more detail.

Watch
Copyright ©2024 VirtualPairProgrammers.com