Skip to content

Commit e54c10a

Browse files
committed
2 parents e512a61 + 96156ec commit e54c10a

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

Diff for: HibernateSpringBootDtoRecordJbcTemplate/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
**[DTO Via JDK14 Records And Spring Data Query Builder Mechanism](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoRecordConstructor)**
1+
**[DTO Via JDK14 Records, `JdbcTemplate` And `ResultSetExtractor`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoRecordJbcTemplate)**
22

3-
**Description:** Fetching more data than needed is prone to performance penalities. Using DTO allows us to extract only the needed data. In this application we rely on JDK14 Records feature and Spring Data Query Builder Mechanism.
3+
**Description:** Fetching more data than needed is prone to performance penalities. Using DTO allows us to extract only the needed data. In this application we rely on JDK14 Records feature, `JdbcTemplate` and `ResultSetExtractor`.
44

55
From Openjdk JEP359:
66

77
*Records provide a compact syntax for declaring classes which are transparent holders for shallowly immutable data.*
88

99
**Key points:**
10-
Define the `AuthorDto` as:
1110

12-
`public record AuthorDto(String name, int age) implements Serializable {}`
11+
- define the Java Records as `AuthorDto` and `BookDto`
12+
- use `JdbcTemplate` and `ResultSetExtractor`
1313

1414
-----------------------------------------------------------------------------------------------------------------------
1515
<table>

Diff for: README.md

+15
Original file line numberDiff line numberDiff line change
@@ -4033,3 +4033,18 @@ As DTO, we rely on JDK 14 Records. From Openjdk JEP359:
40334033
**Key points:**
40344034
- define the Java Records as `AuthorDto` and `BookDto`
40354035
- implement the `ResultTransformer` interface
4036+
4037+
-----------------------------------------------------------------------------------------------------------------------
4038+
4039+
275. **[DTO Via JDK14 Records, `JdbcTemplate` And `ResultSetExtractor`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoRecordJbcTemplate)**
4040+
4041+
**Description:** Fetching more data than needed is prone to performance penalities. Using DTO allows us to extract only the needed data. In this application we rely on JDK14 Records feature, `JdbcTemplate` and `ResultSetExtractor`.
4042+
4043+
From Openjdk JEP359:
4044+
4045+
*Records provide a compact syntax for declaring classes which are transparent holders for shallowly immutable data.*
4046+
4047+
**Key points:**
4048+
4049+
- define the Java Records as `AuthorDto` and `BookDto`
4050+
- use `JdbcTemplate` and `ResultSetExtractor`

0 commit comments

Comments
 (0)