Master Hibernate and JPA with Spring Boot in 100 Steps

Master Hibernate and JPA with Spring Boot in 100 Steps

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 13 Hours | 1.67 GB

Learn fundamentals of Java Persistence API (JPA) and Hibernate framework using Spring and Spring Boot

The Java Persistence API provides Java developers with an api for mapping java objects to relational data. In this course, you will learn about the JPA API, JPQL (Java Persistence query language), Java Persistence Criteria API and how you can perform ORM (Object Relational Mapping) with JPA.

Hibernate is the most popular implementation of JPA. It was the most popular ORM framework option before JPA emerged and it provides additional features on top of JPA. We will use Hibernate as the JPA implementation in this course.

During this course

  • You will learn the basics of JPA and Hibernate – Entities, Relationships, Inheritance Mappings and Annotations
  • You will understand approaches to querying data using JPA and Hibernate – JPQL, Criteria API and Native Queries
  • You will understand JPA and Hibernate Relationships in depth – One to One, Many to One and Many to Many
  • You will use a variety of Spring Boot Starters – Spring Boot Starter Web, Starter Data Jpa, Starter Test
  • You will learn the basic of performance tuning your JPA application with Hibernate – Solve N+1 Queries Issue.
  • You will learn the basics of caching – First Level Cache and Second Level Cache with EhCache
  • You will understand the basics of Spring Data JPA and Spring Data REST
Table of Contents

Introduction
1 Master Hibernate and JPA with Spring Boot – Preview
2 Congratulations
3 One Thing You Should Do
4 Master Hibernate and JPA with Spring Boot – Course Overview
5 Master Hibernate and JPA with Spring Boot – Git Repository
6 Master Hibernate and JPA with Spring Boot – Installing Basic Tools
7 Quick introduction to JPA

Introduction to Spring Boot in 10 Steps
8 Introduction to Spring Boot in 10 Steps
9 Step 1 _ Introduction to Spring Boot – Goals and Important Features
10 Step 2 _ Developing Spring Applications before Spring Boot
11 Step 3 _ Using Spring Initializr to create a Spring Boot Application
12 Step 4 _ Creating a Simple REST Controller
13 Step 5 _ What is Spring Boot Auto Configuration_
14 Step 6 _ Spring Boot vs Spring vs Spring MVC
15 Step 7 _ Spring Boot Starter Projects – Starter Web and Starter JPA
16 Step 8 _ Overview of different Spring Boot Starter Projects
17 Step 9 _ Spring Boot Actuator
18 Step 10 _ Spring Boot Developer Tools

Journey From Spring JDBC to JPA
19 Introduction to Journey from JDBC To JPA
20 Step 01 – Setting up a project with JDBC_ JPA_ H2 and Web Dependencies
21 Step 02 – Launching up H2 Console
22 Step 03 – Creating a Database Table in H2
23 Step 04 – Populate data into Person Table
24 Step 05 – Implement findAll persons Spring JDBC Query Method
25 Step 06 – Execute the findAll method using CommandLineRunner
26 Step 07 – A Quick Review – JDBC vs Spring JDBC
27 Step 08 – Whats in the background_ Understanding Spring Boot Autoconfiguration
28 Step 09 – Implementing findById Spring JDBC Query Method
29 Step 10 – Implementing deleteById Spring JDBC Update Method
30 Step 11 – Implementing insert and update Spring JDBC Update Methods
31 Step 12 – Creating a custom Spring JDBC RowMapper
32 Step 13 – Quick introduction to JPA
33 Step 14 – Defining Person Entity
34 Step 15 – Implementing findById JPA Repository Method
35 Step 16 – Implementing insert and update JPA Repository Methods
36 Step 17 – Implementing deleteById JPA Repository Method
37 Step 18 – Implementing findAll using JPQL Named Query

Introduction to JUnit in 5 Steps
38 Introduction to JUnit in 5 Steps
39 Step 1 _ What is JUnit and Unit Testing_
40 Step 2 _ First JUnit Project and Green Bar
41 Step 3 _ First Code and First Unit Test
42 Step 4 _ Other assert methods
43 Step 5 _ Important annotations

JPA and Hibernate in Depth
44 Introduction to JPA and Hibernate in Depth
45 Step 01 – Create a JPA Project with H2 and Spring Boot
46 Step 02 – Create JPA Entity Course
47 Step 03 – Create findById using JPA Entity Manager
48 Step 04 – Configuring application_properties to enable H2 console and logging
49 Step 05 – Writing Unit Test for findById method
50 Step 06 – Writing a deleteByID method to delete an Entity
51 Step 07 – Writing Unit Test for deleteById method
52 Step 08 – Writing a save method to update and insert an Entity
53 Step 09 – Writing Unit Test for save method
54 Step 10 – Quick Review and Debugging Tips
55 Step 11 – Playing with Entity Manager
56 Step 12 – Entity Manager Methods – clear and detach
57 Step 13 – Entity Manager Methods – refresh
58 Step 14 – A Quick Review of Entity Manager
59 Step 15 – JPQL – Basics
60 Step 16 – JPA and Hibernate Annotations – @Table
61 Step 17 – JPA and Hibernate Annotations – @Column
62 Step 18 – JPA and Hibernate Annotations – @UpdateTimestamp & @CreationTimestamp
63 Step 19 – JPA and Hibernate Annotations – @NamedQuery and @NamedQueries
64 Step 20 – Native Queries – Basics

Establishing Relationships with JPA and Hibernate – OneToOne
65 Step 21 – Entities and Relationships – An overview
66 Step 22 – Defining Entities – Student_ Passport and Review
67 Step 23 – Introduction to One to One Relationship
68 Step 24 – OneToOne Mapping – Insert Student with Passport
69 Step 25 – OneToOne Mapping – Retrieving Student with Passport and Eager Fetch
70 Step 26 – OneToOne Mapping – Lazy Fetch
71 Step 27 – Transaction_ Entity Manager and Persistence Context
72 Step 28 – OneToOne Mapping – Bidirectional Relationship – Part 1
73 Step 29 – OneToOne Mapping – Bidirectional Relationship – Part 2

Let’s review with a few FAQs about Hibernate and JPA
74 FAQ 1 – When does Hibernate send updates to the database_
75 FAQ 2 – When do we need @Transactional in an Unit Test_
76 FAQ 3 – Do read only methods need a transaction_
77 FAQ 4 – Why do we use @DirtiesContext in an Unit Test_

Establishing Relationships with JPA and Hibernate – OneToMany and ManyToMany
78 Step 30 – ManyToOne Mapping – Designing the database
79 Step 30 – Part 2 – ManyToOne Mapping – Implementing the Mapping
80 Step 31 – ManyToOne Mapping – Retrieving and inserting Reviews for Course
81 Step 32 – ManyToOne Mapping – Generalizing Insert Reviews
82 Step 33 – ManyToOne Mapping – Wrapping up
83 Step 34 – ManyToMany Mapping – Table Design
84 Step 35 – ManyToMany Mapping – Adding Annotations on Entities
85 Step 36 – ManyToMany Mapping – Fixing two join tables problem
86 Step 37 – ManyToMany Mapping – Customizing the Join Table
87 Step 38 – ManyToMany Mapping – Insert Data and Write Join Query
88 Step 39 – ManyToMany Mapping – Retrieve Data using JPA Relationships
89 Step 40 – ManyToMany Mapping – Insert Student and Course
90 Step 41 – Relationships between JPA Entities – A summary

Inheritance Hierarchies with JPA and Hibernate
91 Step 42 – Introduction to Inheritance Hierarchies and Mappings
92 Step 43 – JPA Inheritance Hierarchies and Mappings – Setting up entities
93 Step 44 – JPA Inheritance Hierarchies and Mappings – Setting up a Repository
94 Step 45 – JPA Inheritance Hierarchies and Mappings – Single Table
95 Step 46 – JPA Inheritance Hierarchies and Mappings – Table Per Class
96 Step 47 – JPA Inheritance Hierarchies and Mappings – Joined
97 Step 48 – JPA Inheritance Hierarchies and Mappings – Mapped Super Class
98 Step 49 – JPA Inheritance Hierarchies and Mappings – How to Choose_

Queries with Entities using JPQL
99 Step 50 – JPQL – Courses without Students
100 Step 51 – JPQL – Courses with atleast 2 Students and order by
101 Step 52 – JPQL – Courses like 100 Steps
102 Step 53 – JPQL – Using Joins

Queries using Java API – Criteria Queries
103 Step 54 – Criteria Query – Retrieving all courses
104 Step 55 – Criteria Query – Courses like 100 Steps
105 Step 56 – Criteria Query – Courses without Students
106 Step 57 – Criteria Query – Using Joins

Transaction Management
107 Step 58 – Introduction to Transaction Management
108 Step 59 – Transaction Management – ACID Properties
109 Step 60 – Understanding Dirty_ Phanthom and Non Repeatable Reads
110 Step 61 – Understand 4 Isolation Levels
111 Step 62 – Choosing between Isolation Levels
112 Step 63 – Implementing Transaction Management – 3 Things to Decide

Spring Data JPA & Spring Data REST
113 Step 64 – Introduction to Spring Data JPA
114 Step 65 – Testing the Spring Data JPA Repository with findById_
115 Step 66 – Spring Data JPA Repository – CRUD Methods
116 Step 67 – Sorting using Spring Data JPA Repository
117 Step 68 – Pagination using Spring Data JPA Repository
118 Step 69 – Custom Queries using Spring Data JPA Repository
119 Step 70 – Spring Data REST

Caching with Hibernate & JPA
120 Step 71 – Introduction to Caching
121 Step 72 – Hibernate and JPA Caching – First Level Cache
122 Step 73 – Hibernate and JPA Caching – Basics of Second Level Cache with EhCache
123 Step 74 – Hibernate and JPA Caching – Second Level Cache Part 2

Hibernate & JPA Tips
124 Step 75 – Hibernate Tips – Hibernate Soft Deletes – @SQLDelete and @Where
125 Step 76 – Hibernate Soft Deletes – Part 2
126 Step 77 – JPA Entity Life Cycle Methods
127 Step 78 – Using Embedded and Embeddable with JPA
128 Step 79 – Using Enums with JPA
129 Step 80 – JPA Tip – Be cautious with toString method implementations
130 Step 81 – JPA Tip – When do you use JPA_

Performance Tuning Tips with Hibernate & JPA
131 Step 82 – Performance Tuning – Measure before Tuning
132 Step 83 – Performance Tuning – Indexes
133 Step 84 – Performance Tuning – Use Appropriate Caching
134 Step 85 – Performance Tuning – Eager vs Lazy Fetch
135 Step 86 – Performance Tuning – Avoid N+1 Problems

Few more FAQ
136 FAQ 5 – How to connect to a different database with Spring Boot_
137 FAQ 6 – Approach to design great applications with JPA_
138 FAQ 7 – Good Practices for developing JPA Applications

Congratulations
139 Bonus Lecture _ Our Best Selling Courses
140 Congratulations

Appendix – Introduction to Spring Framework in 10 Steps
141 Introduction to Spring Framework in 10 Steps
142 Step 1 – Setting up a Spring Project using htttp___start_spring_io
143 Step 2 – Understanding Tight Coupling using the Binary Search Algorithm Example
144 Step 3 – Making the Binary Search Algorithm Example Loosely Coupled
145 Step 4 – Using Spring to Manage Dependencies – @Component_ @Autowired
146 Step 5 – What is happening in the background_
147 Step 6 – Dynamic auto wiring and Troubleshooting – @Primary
148 Step 7 – Constructor and Setter Injection
149 Step 8 – Spring Modules
150 Step 9 – Spring Projects
151 Step 10 – Why is Spring Popular