|
1 | 1 | package com.mapk.krowmapper
|
2 | 2 |
|
3 | 3 | import com.mapk.annotations.KColumnDeserializer
|
4 |
| -import com.mapk.core.EnumMapper |
5 | 4 | import com.mapk.core.KFunctionWithInstance
|
6 | 5 | import com.mapk.core.ValueParameter
|
7 | 6 | import com.mapk.core.getAnnotatedFunctions
|
@@ -42,10 +41,6 @@ internal sealed class ParameterForMap<S, D> {
|
42 | 41 | }
|
43 | 42 | }
|
44 | 43 |
|
45 |
| - private class Enum<D>(override val name: String, val enumClazz: Class<D>) : ParameterForMap<String, D>() { |
46 |
| - override fun getObject(rs: ResultSet): D? = EnumMapper.getEnum(enumClazz, rs.getString(name)) |
47 |
| - } |
48 |
| - |
49 | 44 | private class Deserializer<S : Any, D>(
|
50 | 45 | override val name: String,
|
51 | 46 | val srcClazz: Class<S>,
|
@@ -73,14 +68,7 @@ internal sealed class ParameterForMap<S, D> {
|
73 | 68 | return Deserializer(param.name, srcClass, it)
|
74 | 69 | }
|
75 | 70 |
|
76 |
| - val requiredClazz = param.requiredClazz.javaObjectType |
77 |
| - |
78 |
| - return requiredClazz.let { |
79 |
| - when (it.isEnum) { |
80 |
| - true -> Enum(param.name, it) |
81 |
| - false -> Default(param.name, it, conversionService) |
82 |
| - } |
83 |
| - } |
| 71 | + return Default(param.name, param.requiredClazz.javaObjectType, conversionService) |
84 | 72 | }
|
85 | 73 | }
|
86 | 74 | }
|
|
0 commit comments