From ffe114942864a4dca98c9cd5ae848717015d349a Mon Sep 17 00:00:00 2001 From: Aaron2278 Date: Mon, 11 Mar 2024 16:55:28 +0000 Subject: [PATCH] fix: changed to more effecient datatype for col2 --- .../dataprovider/AaronSantiagoProvider.java | 22 +++++ .../main/resources/data/aaronsantiago.json | 92 +++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 lesson_05/types/types_app/src/main/java/com/codedifferently/lesson5/dataprovider/AaronSantiagoProvider.java create mode 100644 lesson_05/types/types_app/src/main/resources/data/aaronsantiago.json diff --git a/lesson_05/types/types_app/src/main/java/com/codedifferently/lesson5/dataprovider/AaronSantiagoProvider.java b/lesson_05/types/types_app/src/main/java/com/codedifferently/lesson5/dataprovider/AaronSantiagoProvider.java new file mode 100644 index 00000000..c53022d4 --- /dev/null +++ b/lesson_05/types/types_app/src/main/java/com/codedifferently/lesson5/dataprovider/AaronSantiagoProvider.java @@ -0,0 +1,22 @@ +package com.codedifferently.lesson5.dataprovider; + +import java.util.Map; +import org.springframework.stereotype.Service; + +@Service +public class AaronSantiagoProvider extends DataProvider { + public String getProviderName() { + return "aaronsantiago"; + } + + public Map getColumnTypeByName() { + return Map.of( + "column1", Long.class, + "column2", Short.class, + "column3", Integer.class, + "column4", Double.class, + "column5", Boolean.class, + "column6", String.class, + "column7", Float.class); + } +} diff --git a/lesson_05/types/types_app/src/main/resources/data/aaronsantiago.json b/lesson_05/types/types_app/src/main/resources/data/aaronsantiago.json new file mode 100644 index 00000000..281bdc82 --- /dev/null +++ b/lesson_05/types/types_app/src/main/resources/data/aaronsantiago.json @@ -0,0 +1,92 @@ +[ + { + "column1": "8021617119863445504", + "column2": "12876", + "column3": "1507084994", + "column4": "4.960121985830803E307", + "column5": "false", + "column6": "hizxe4u3", + "column7": "2.7161422E38" + }, + { + "column1": "2784514035727543296", + "column2": "13984", + "column3": "121436784", + "column4": "1.0481932880019241E308", + "column5": "false", + "column6": "m2qogb9168", + "column7": "1.1755943E38" + }, + { + "column1": "8540468770226965504", + "column2": "5047", + "column3": "1088543043", + "column4": "1.0410346658580802E308", + "column5": "false", + "column6": "s1oulfwn8", + "column7": "2.7863149E38" + }, + { + "column1": "8814347693214015488", + "column2": "7854", + "column3": "980684217", + "column4": "4.1357845071862433E307", + "column5": "false", + "column6": "f4z8sy", + "column7": "8.3855787E37" + }, + { + "column1": "4512523429958404096", + "column2": "14872", + "column3": "881941291", + "column4": "1.4277797319059275E308", + "column5": "true", + "column6": "tcb7ji", + "column7": "2.8878202E38" + }, + { + "column1": "1498144379577860608", + "column2": "23359", + "column3": "1201087203", + "column4": "1.411667594380979E308", + "column5": "true", + "column6": "174r60fa53n", + "column7": "8.2908685E37" + }, + { + "column1": "7379905184042490880", + "column2": "28235", + "column3": "1979568008", + "column4": "8.440394641368463E307", + "column5": "false", + "column6": "re9j354x", + "column7": "2.6941474E38" + }, + { + "column1": "3535766253948793856", + "column2": "30768", + "column3": "591616124", + "column4": "1.03740846022905E308", + "column5": "false", + "column6": "i4ja6nhy2lqv", + "column7": "2.5594035E37" + }, + { + "column1": "516571131347934528", + "column2": "26694", + "column3": "912557766", + "column4": "3.7253732575389864E307", + "column5": "true", + "column6": "qxth71ra3j5c", + "column7": "8.751905E37" + }, + { + "column1": "9167923257838168064", + "column2": "18468", + "column3": "1675332497", + "column4": "1.3818560330114934E308", + "column5": "false", + "column6": "8xbaltqk61zd", + "column7": "9.151857E37" + } +] \ No newline at end of file