diff --git a/lesson_09/types/types_app/src/main/java/com/codedifferently/lesson9/dataprovider/NileJacksonProvider.java b/lesson_09/types/types_app/src/main/java/com/codedifferently/lesson9/dataprovider/NileJacksonProvider.java new file mode 100644 index 00000000..dd217d20 --- /dev/null +++ b/lesson_09/types/types_app/src/main/java/com/codedifferently/lesson9/dataprovider/NileJacksonProvider.java @@ -0,0 +1,28 @@ +package com.codedifferently.lesson9.dataprovider; + +import java.util.Map; +import org.springframework.stereotype.Service; + +@Service +public class NileJacksonProvider extends DataProvider { + + @Override + public String getProviderName() { + + return "nilejack"; + } + + @SuppressWarnings("rawtypes") + @Override + public Map getColumnTypeByName() { + + return Map.of( + "column1", Boolean.class, + "column2", Double.class, + "column3", Integer.class, + "column4", Long.class, + "column5", Short.class, + "column6", Float.class, + "column7", String.class); + } +} diff --git a/lesson_09/types/types_app/src/main/resources/data/nilejack.json b/lesson_09/types/types_app/src/main/resources/data/nilejack.json new file mode 100644 index 00000000..52d33125 --- /dev/null +++ b/lesson_09/types/types_app/src/main/resources/data/nilejack.json @@ -0,0 +1,92 @@ +[ + { + "column1": "true", + "column2": "8.050105166356494E307", + "column3": "766782637", + "column4": "7298784450208038912", + "column5": "6468", + "column6": "2.9936206E38", + "column7": "w74mkyeujg2" + }, + { + "column1": "false", + "column2": "1.438279322271856E308", + "column3": "972373969", + "column4": "2504451348935218688", + "column5": "20311", + "column6": "3.3115875E38", + "column7": "hyjkgt" + }, + { + "column1": "false", + "column2": "4.0883457051069477E306", + "column3": "1150975868", + "column4": "5043210076625723392", + "column5": "12219", + "column6": "1.3983301E38", + "column7": "jr7pb1" + }, + { + "column1": "true", + "column2": "1.331772707285438E308", + "column3": "1984064480", + "column4": "4514867651350260736", + "column5": "25270", + "column6": "2.5673697E37", + "column7": "c0lyem" + }, + { + "column1": "true", + "column2": "8.909705599370497E307", + "column3": "457881506", + "column4": "7352240979843026944", + "column5": "28872", + "column6": "1.3840811E38", + "column7": "8594zfo" + }, + { + "column1": "false", + "column2": "2.718461245307317E307", + "column3": "799016699", + "column4": "4209853829876815872", + "column5": "9617", + "column6": "2.902755E38", + "column7": "5wfhieq6k2b" + }, + { + "column1": "false", + "column2": "3.575286117193886E307", + "column3": "1796453086", + "column4": "4648194333129626624", + "column5": "28187", + "column6": "2.2096927E38", + "column7": "u7z1osx4l" + }, + { + "column1": "false", + "column2": "9.598052667990505E307", + "column3": "868625049", + "column4": "7339097490482971648", + "column5": "274", + "column6": "2.4408217E38", + "column7": "jtr8e73zg" + }, + { + "column1": "false", + "column2": "3.660769639887024E307", + "column3": "474245388", + "column4": "2334604646072258048", + "column5": "2051", + "column6": "1.1225729E38", + "column7": "jzaqxuh48d" + }, + { + "column1": "true", + "column2": "4.595442288389816E307", + "column3": "907572760", + "column4": "4219750032852018176", + "column5": "8582", + "column6": "3.3740117E38", + "column7": "bpiz3wtjourn" + } +] \ No newline at end of file