-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds Rich's dataprovider and json files for lesson_05 (#161)
* feat: adds data provider and json for lesson 5 * chore: fixes empty java file * chore: ran spotless apply to fix formatting fail * chore: fixes class naming error * chore: runs spotless apply for format violation again
- Loading branch information
1 parent
aab3f78
commit 28898c5
Showing
2 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...types_app/src/main/java/com/codedifferently/lesson5/dataprovider/RichHawkinsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.codedifferently.lesson5.dataprovider; | ||
|
||
import java.util.Map; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class RichHawkinsProvider extends DataProvider { | ||
public String getProviderName() { | ||
return "richhawkins"; | ||
} | ||
|
||
public Map<String, Class> getColumnTypeByName() { | ||
return Map.of( | ||
"column1", Boolean.class, | ||
"column2", String.class, | ||
"column3", Integer.class, | ||
"column4", Float.class, | ||
"column5", Short.class, | ||
"column6", Double.class, | ||
"column7", Long.class); | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
lesson_05/types/types_app/src/main/resources/data/richhawkins.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
[ | ||
{ | ||
"column1": "true", | ||
"column2": "5vhl2qk1u", | ||
"column3": "1870756030", | ||
"column4": "2.610448E37", | ||
"column5": "18747", | ||
"column6": "1.7746740090908933E308", | ||
"column7": "4630583200903412736" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "jnsvrfbpo05", | ||
"column3": "678885898", | ||
"column4": "1.578116E38", | ||
"column5": "15066", | ||
"column6": "1.5199139676365122E308", | ||
"column7": "1271928104063641600" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "9ge82lkf", | ||
"column3": "1041050297", | ||
"column4": "2.4785373E37", | ||
"column5": "26784", | ||
"column6": "1.195949022780321E308", | ||
"column7": "1527142668874609664" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "lrhq53i12e", | ||
"column3": "646299013", | ||
"column4": "2.6499915E38", | ||
"column5": "26636", | ||
"column6": "7.054740517137806E307", | ||
"column7": "5424923561925813248" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "2qtp6gxbr", | ||
"column3": "1564420887", | ||
"column4": "6.858343E37", | ||
"column5": "11344", | ||
"column6": "7.307408309923982E307", | ||
"column7": "2518656942910915072" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "spk5m", | ||
"column3": "465805922", | ||
"column4": "8.903617E37", | ||
"column5": "15156", | ||
"column6": "1.6595557745039697E308", | ||
"column7": "3857996874770821120" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "24exf", | ||
"column3": "1220607715", | ||
"column4": "1.8905642E38", | ||
"column5": "21003", | ||
"column6": "5.532467101462648E307", | ||
"column7": "5019038537173087232" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "klabe9o", | ||
"column3": "167885532", | ||
"column4": "1.6137831E38", | ||
"column5": "23142", | ||
"column6": "1.4032626343698397E308", | ||
"column7": "93308452344391792" | ||
}, | ||
{ | ||
"column1": "false", | ||
"column2": "as6m2vj8ou7b", | ||
"column3": "42392774", | ||
"column4": "2.070791E38", | ||
"column5": "1980", | ||
"column6": "9.48815812058577E307", | ||
"column7": "773098275761414912" | ||
}, | ||
{ | ||
"column1": "true", | ||
"column2": "imo16qu8ablg", | ||
"column3": "925010963", | ||
"column4": "2.8022891E38", | ||
"column5": "20529", | ||
"column6": "1.7764650224382368E308", | ||
"column7": "9147747523443069952" | ||
} | ||
] |