Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Lesson_05 DataProvider implementation #165

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.codedifferently.lesson5.dataprovider;

import java.math.BigDecimal;
import java.util.Map;
import org.springframework.stereotype.Service;

@Service
public class AaronSantiagoProvider extends DataProvider {
public String getProviderName() {
return "aaronsantiago";
}

public Map<String, Class> getColumnTypeByName() {
return Map.of(
"column1", Long.class,
"column2", BigDecimal.class,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the instructions, you were directed to use the "closest possible data type." There is a different data types that would be more efficient to store the data in column2 based on its size.

"column3", Integer.class,
"column4", Double.class,
"column5", Boolean.class,
"column6", String.class,
"column7", Float.class);
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
]