Commit fb858bf
DATAJDBC-235 - Add support for configurable conversion.
We now support configurable conversion by introducing CustomConversions and RelationalConverter. CustomConversions is a registry for converters that should be applied on a per-type basis for properties. CustomConversions is typically registered as bean and fed into RelationalMappingContext and the newly introduced RelationalConverter to consider simple types and conversion rules.
RelationalConverter with its implementation BasicRelationalConverter encapsulates conversion infrastructure such as EntityInstantiator, CustomConversions, and MappingContext that is required during relational value conversion. BasicRelationalConverter is responsible for simple value conversion and entity instantiation to pull related code together. It's not in full charge of row result to object mapping as this responsibility remains as part of DataAccessStrategy.
This change supersedes and removes ConversionCustomizer.1 parent 9ad0cf0 commit fb858bf
File tree
22 files changed
+833
-239
lines changed- src
- main/java/org/springframework/data
- jdbc
- core
- convert
- mapping
- mybatis
- repository
- config
- support
- relational/core
- conversion
- mapping
- test/java/org/springframework/data
- jdbc
- core
- mapping/model
- mybatis
- repository
- support
- testing
- relational/core/conversion
22 files changed
+833
-239
lines changedLines changed: 19 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | | - | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
234 | | - | |
| 236 | + | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
| |||
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
| 286 | + | |
| 287 | + | |
284 | 288 | | |
| 289 | + | |
285 | 290 | | |
286 | | - | |
287 | 291 | | |
288 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
289 | 295 | | |
290 | 296 | | |
291 | 297 | | |
| |||
318 | 324 | | |
319 | 325 | | |
320 | 326 | | |
321 | | - | |
322 | | - | |
323 | | - | |
| 327 | + | |
324 | 328 | | |
325 | 329 | | |
326 | | - | |
| 330 | + | |
327 | 331 | | |
328 | 332 | | |
329 | 333 | | |
| |||
344 | 348 | | |
345 | 349 | | |
346 | 350 | | |
347 | | - | |
| 351 | + | |
348 | 352 | | |
349 | 353 | | |
350 | 354 | | |
| |||
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
363 | | - | |
| 367 | + | |
364 | 368 | | |
365 | 369 | | |
366 | 370 | | |
367 | 371 | | |
368 | 372 | | |
369 | 373 | | |
370 | 374 | | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | 375 | | |
386 | 376 | | |
387 | 377 | | |
| |||
Lines changed: 15 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
33 | 30 | | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 40 | + | |
| 41 | + | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
57 | | - | |
| 54 | + | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
61 | | - | |
62 | 58 | | |
63 | | - | |
64 | | - | |
| 59 | + | |
| 60 | + | |
65 | 61 | | |
66 | 62 | | |
67 | | - | |
| 63 | + | |
68 | 64 | | |
69 | | - | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
| |||
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
83 | | - | |
84 | | - | |
| 78 | + | |
85 | 79 | | |
86 | 80 | | |
87 | 81 | | |
| |||
118 | 112 | | |
119 | 113 | | |
120 | 114 | | |
121 | | - | |
| 115 | + | |
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
| |||
138 | 132 | | |
139 | 133 | | |
140 | 134 | | |
141 | | - | |
142 | | - | |
| 135 | + | |
143 | 136 | | |
144 | | - | |
145 | | - | |
| 137 | + | |
146 | 138 | | |
147 | 139 | | |
148 | | - | |
| 140 | + | |
149 | 141 | | |
150 | 142 | | |
151 | 143 | | |
152 | 144 | | |
153 | 145 | | |
154 | 146 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 147 | + | |
158 | 148 | | |
159 | 149 | | |
160 | 150 | | |
161 | 151 | | |
162 | 152 | | |
163 | 153 | | |
164 | 154 | | |
165 | | - | |
166 | 155 | | |
167 | 156 | | |
168 | 157 | | |
169 | 158 | | |
170 | 159 | | |
171 | 160 | | |
| 161 | + | |
172 | 162 | | |
173 | 163 | | |
174 | 164 | | |
| |||
177 | 167 | | |
178 | 168 | | |
179 | 169 | | |
180 | | - | |
| 170 | + | |
181 | 171 | | |
182 | 172 | | |
183 | 173 | | |
| |||
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments