|
30 | 30 |
|
31 | 31 | import org.springframework.core.convert.converter.Converter; |
32 | 32 | import org.springframework.core.convert.converter.ConverterFactory; |
33 | | -import org.springframework.data.convert.CustomConversions; |
34 | | -import org.springframework.data.convert.Jsr310Converters; |
35 | | -import org.springframework.data.convert.WritingConverter; |
36 | | -import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.LocalDateConverterOverride; |
37 | | -import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.LocalDateTimeConverterOverride; |
38 | | -import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.LocalTimeConverterOverride; |
39 | 33 | import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToOffsetDateTimeConverter; |
40 | 34 | import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToStringConverter; |
41 | 35 | import org.springframework.data.r2dbc.convert.R2dbcConverters.RowToNumberConverterFactory.RowToUuidConverter; |
@@ -73,22 +67,6 @@ public static Collection<Object> getConvertersToRegister() { |
73 | 67 | return converters; |
74 | 68 | } |
75 | 69 |
|
76 | | - /** |
77 | | - * @return A list of the registered converters to enforce JSR-310 type usage. |
78 | | - * @see CustomConversions#DEFAULT_CONVERTERS |
79 | | - * @see Jsr310Converters |
80 | | - */ |
81 | | - public static Collection<Object> getOverrideConvertersToRegister() { |
82 | | - |
83 | | - List<Object> converters = new ArrayList<>(); |
84 | | - |
85 | | - converters.add(LocalDateConverterOverride.INSTANCE); |
86 | | - converters.add(LocalDateTimeConverterOverride.INSTANCE); |
87 | | - converters.add(LocalTimeConverterOverride.INSTANCE); |
88 | | - |
89 | | - return converters; |
90 | | - } |
91 | | - |
92 | 70 | /** |
93 | 71 | * Simple singleton to convert {@link Row}s to their {@link Boolean} representation. |
94 | 72 | * |
@@ -252,52 +230,5 @@ public ZonedDateTime convert(Row row) { |
252 | 230 | } |
253 | 231 | } |
254 | 232 |
|
255 | | - /** |
256 | | - * {@link Converter} override that forces {@link LocalDate} to stay on {@link LocalDate}. |
257 | | - * |
258 | | - * @author Mark Paluch |
259 | | - */ |
260 | | - @WritingConverter |
261 | | - public enum LocalDateConverterOverride implements Converter<LocalDate, LocalDate> { |
262 | | - |
263 | | - INSTANCE; |
264 | | - |
265 | | - @Override |
266 | | - public LocalDate convert(LocalDate value) { |
267 | | - return value; |
268 | | - } |
269 | | - } |
270 | | - |
271 | | - /** |
272 | | - * {@link Converter} override that forces {@link LocalDateTime} to stay on {@link LocalDateTime}. |
273 | | - * |
274 | | - * @author Mark Paluch |
275 | | - */ |
276 | | - @WritingConverter |
277 | | - public enum LocalDateTimeConverterOverride implements Converter<LocalDateTime, LocalDateTime> { |
278 | | - |
279 | | - INSTANCE; |
280 | | - |
281 | | - @Override |
282 | | - public LocalDateTime convert(LocalDateTime value) { |
283 | | - return value; |
284 | | - } |
285 | | - } |
286 | | - |
287 | | - /** |
288 | | - * {@link Converter} override that forces {@link LocalTime} to stay on {@link LocalTime}. |
289 | | - * |
290 | | - * @author Mark Paluch |
291 | | - */ |
292 | | - @WritingConverter |
293 | | - public enum LocalTimeConverterOverride implements Converter<LocalTime, LocalTime> { |
294 | | - |
295 | | - INSTANCE; |
296 | | - |
297 | | - @Override |
298 | | - public LocalTime convert(LocalTime value) { |
299 | | - return value; |
300 | | - } |
301 | | - } |
302 | 233 | } |
303 | 234 | } |
0 commit comments