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.
Having problems? check the errata for this course.
1 |
Introduction |
Preview
23m 55s |
|
A general overview of Hibernate - why would you use it? | |||
2 |
Getting Started |
Preview
60m 52s |
|
We set up your development environment and install Hibernate. Also, an overview of SQL if you need it. | |||
3 |
Persisting Objects |
Watch
31m 24s |
|
How to change a plain Java class into a persitable class. | |||
4 |
Configuring Hibernate |
Watch
40m 33s |
|
How to configure Hibernate, including the hibernate.cfg.xml file | |||
5 |
Manipulating Objects |
Watch
36m 39s |
|
How to update and delete objects. | |||
6 |
More on Mapping |
Watch
47m 54s |
|
More options when you are mapping your classes - @Table, @Column annotations and the difference between field and property access. | |||
7 |
Crashes and Logging |
Watch
22m 17s |
|
How to handle exceptions properly in Hibernate. We also configure log4j to give detailed information that will be useful later. | |||
8 |
Relationships |
Preview
41m 31s |
|
We create a Many-to-One relationship and study how this affects the database. | |||
9 |
Collections |
Watch
56m 8s |
|
We now switch to collections - Sets, Lists and Maps and see how to handle a One-To-Many relationship. | |||
10 |
Bi Directional Relationships |
Watch
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! | |||
11 |
Many to Many Relationships |
Watch
28m 23s |
|
This short chapter is followed by a major coding exercise. | |||
12 |
equals and hashCode |
Watch
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. | |||
13 |
XML Mappings |
Watch
46m 35s |
|
Optional chapter - only needed if you are using the legacy XML coding style. | |||
14 |
Java Persistence API |
Watch
47m 4s |
|
The JPA is a standardised version of Hibernate - see the differences. We will use JPA for the rest of the course. | |||
15 |
Cascades |
Watch
28m 0s |
|
Cascades can reduce the amount of persistence code you write. | |||
16 |
Embedding Objects |
Watch
53m 17s |
|
How to use the @Embed and @Embeddable annotations. | |||
17 |
Queries - Part One |
Watch
43m 38s |
|
How to use the HQL and JPQL. | |||
18 |
Queries - Part Two |
Watch
45m 22s |
|
More on HQL and JPQL. | |||
19 |
Queries - Part Three |
Watch
48m 21s |
|
Even more on HQL and JPQL! | |||
20 |
Criteria API - Part One |
Watch
38m 36s |
|
How to use the Criteria API in the Classic Hibernate (ie using Sessions). | |||
21 |
Criteria API - Part Two |
Watch
50m 58s |
|
JPA2 also has a criteria API. Full details, including the TypeSafe API. | |||
22 |
Inheritance |
Watch
64m 14s |
|
Three different strategies for handling inheritance - "Single Table", "Joined Table" and "Class per Table". | |||
23 |
Detaching and Merging |
Watch
52m 40s |
|
What is detaching - and how to use the merge() method. Also covers the classic versions of update() and saveOrUpdate() | |||
24 |
Optimistic Locking and Versioning |
Watch
41m 0s |
|
What is optimistic locking? We see that Hibernate can version objects to prevent concurrent database changes affecting your business process. | |||
25 |
Pessimistic Locking |
Watch
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. | |||
26 |
Lazy Initialisation |
Watch
52m 14s |
|
This is Hibernate's biggest performance optimisation. We see how you can avoid the LazyInitializationException. | |||
27 |
Tuning Performance |
Watch
43m 8s |
|
More options for performance tuning, include Batch Fetching. | |||
28 |
First Level Cache |
Watch
39m 6s |
|
Everyone needs to understand the First Level Cache. Full details in this chapter. | |||
29 |
Second Level Caching |
Watch
80m 59s |
|
An optional chapter: we configure EhCache as a second level to tune performance. | |||
30 |
Web Applications |
Watch
78m 27s |
|
We now look at a full application that uses JPA and Hibernate. | |||
31 |
Spring Applications |
Watch
44m 43s |
|
How does Spring help with Hibernate? (Nb you need to have studied the previous chapter before this one). | |||
32 |
EJB Applications |
Watch
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. | |||
33 |
Course Review |
Watch
22m 6s |
|
The best books on the market, where to go from here and a few things we missed! | |||
34 |
Bonus Chapter - Isolations |
Watch
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. |