Java Persistence API (JPA) Repository Overview And Custom Queries

Vue JS and Spring Boot Microservices and Spring Cloud User Service - (Spring Boot, MySQL, Liquibase...)
3 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€65.64
List Price:  €93.77
You save:  €28.13
£56.58
List Price:  £80.84
You save:  £24.25
CA$96.26
List Price:  CA$137.53
You save:  CA$41.26
A$109.08
List Price:  A$155.84
You save:  A$46.75
S$95.27
List Price:  S$136.11
You save:  S$40.83
HK$548.12
List Price:  HK$783.07
You save:  HK$234.94
CHF 63.72
List Price:  CHF 91.04
You save:  CHF 27.31
NOK kr771.14
List Price:  NOK kr1,101.67
You save:  NOK kr330.53
DKK kr490.05
List Price:  DKK kr700.10
You save:  DKK kr210.05
NZ$118.86
List Price:  NZ$169.82
You save:  NZ$50.95
د.إ257.05
List Price:  د.إ367.23
You save:  د.إ110.18
৳7,664.43
List Price:  ৳10,949.65
You save:  ৳3,285.22
₹5,835.09
List Price:  ₹8,336.20
You save:  ₹2,501.11
RM334.83
List Price:  RM478.35
You save:  RM143.52
₦90,777.03
List Price:  ₦129,687.03
You save:  ₦38,910
₨19,435.77
List Price:  ₨27,766.58
You save:  ₨8,330.81
฿2,575.67
List Price:  ฿3,679.68
You save:  ฿1,104.01
₺2,273.66
List Price:  ₺3,248.23
You save:  ₺974.56
B$364.16
List Price:  B$520.25
You save:  B$156.09
R1,350.44
List Price:  R1,929.28
You save:  R578.84
Лв128.28
List Price:  Лв183.27
You save:  Лв54.98
₩96,200.90
List Price:  ₩137,435.75
You save:  ₩41,234.85
₪263.23
List Price:  ₪376.07
You save:  ₪112.83
₱4,029.53
List Price:  ₱5,756.72
You save:  ₱1,727.18
¥10,822.20
List Price:  ¥15,460.95
You save:  ¥4,638.75
MX$1,196.86
List Price:  MX$1,709.87
You save:  MX$513.01
QR254.81
List Price:  QR364.04
You save:  QR109.22
P969.97
List Price:  P1,385.73
You save:  P415.76
KSh9,183.54
List Price:  KSh13,119.90
You save:  KSh3,936.36
E£3,382.61
List Price:  E£4,832.51
You save:  E£1,449.90
ብር3,968.10
List Price:  ብር5,668.96
You save:  ብር1,700.85
Kz58,581.63
List Price:  Kz83,691.63
You save:  Kz25,110
CLP$66,657.14
List Price:  CLP$95,228.57
You save:  CLP$28,571.42
CN¥506.67
List Price:  CN¥723.85
You save:  CN¥217.17
RD$4,155.65
List Price:  RD$5,936.90
You save:  RD$1,781.25
DA9,420.16
List Price:  DA13,457.95
You save:  DA4,037.79
FJ$159.39
List Price:  FJ$227.72
You save:  FJ$68.32
Q543.16
List Price:  Q775.98
You save:  Q232.81
GY$14,611.27
List Price:  GY$20,874.15
You save:  GY$6,262.87
ISK kr9,886.08
List Price:  ISK kr14,123.58
You save:  ISK kr4,237.50
DH707.48
List Price:  DH1,010.74
You save:  DH303.25
L1,253.52
List Price:  L1,790.82
You save:  L537.30
ден4,041.45
List Price:  ден5,773.75
You save:  ден1,732.29
MOP$563.44
List Price:  MOP$804.95
You save:  MOP$241.50
N$1,341.89
List Price:  N$1,917.07
You save:  N$575.18
C$2,586.83
List Price:  C$3,695.63
You save:  C$1,108.80
रु9,327.64
List Price:  रु13,325.78
You save:  रु3,998.13
S/260.57
List Price:  S/372.26
You save:  S/111.68
K265.99
List Price:  K380
You save:  K114.01
SAR262.56
List Price:  SAR375.10
You save:  SAR112.54
ZK1,793.08
List Price:  ZK2,561.66
You save:  ZK768.57
L326.81
List Price:  L466.89
You save:  L140.08
Kč1,658.72
List Price:  Kč2,369.71
You save:  Kč710.98
Ft25,891.40
List Price:  Ft36,989.30
You save:  Ft11,097.90
SEK kr763.84
List Price:  SEK kr1,091.25
You save:  SEK kr327.40
ARS$60,978.78
List Price:  ARS$87,116.28
You save:  ARS$26,137.50
Bs483.61
List Price:  Bs690.90
You save:  Bs207.29
COP$274,351.87
List Price:  COP$391,948.05
You save:  COP$117,596.17
₡35,072.06
List Price:  ₡50,105.09
You save:  ₡15,033.03
L1,724.15
List Price:  L2,463.18
You save:  L739.02
₲516,670.58
List Price:  ₲738,132.47
You save:  ₲221,461.88
$U2,687.21
List Price:  $U3,839.04
You save:  $U1,151.82
zł283.10
List Price:  zł404.45
You save:  zł121.34
Already have an account? Log In

Transcript

Hi guys, in this lesson we will talk about GPA. You pull stories in springboard. One of the best advantage of spring bird is auto configuration. And one of them is Java Persistence API repository. You know that in most case, generally, we use typical generation operations on repositories. For example, create operation, update operation, delete operation and select operation.

In simply birth GP repository is used for these kind of generic crude operations. So use it, we just need to extract it on our personal class with entity model and ID field off and the class. After we extend it, we can use many repository operations with GP repository. Automatically, these are find by ID save, delete, find all, delete all save all, etc. Most of cases, these methods will be enough for us. But in some cases, these methods could not be enough for us in GP repository.

We can also describe leave queries or new methods. For example, we have a user entity and this entity has ID, username, password, blah, blah, blah fields. And we want to find user according to username field to do it in GP repository. We don't need extra query. We can do it with find by plus field name methods because GP reports can parse method names to queries like find by Id find by username, find by password, etc. Other things about GP repository, we can create new queries with query annotation.

For example, we want to find maximum ID in user table. To find it, we can write a query like silic max ID from user with clear annotation. Last thing about GP post study, we can customize delete or update operations with methods or queries. methods will be similar like other setting operations, but three years query we should add modify annotation to methods because the operations will need commit execution after queries. Of course, there are other many things in GP repository, but for beginning for our course, this will be enough. That's all.

Thank you.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.