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: Implement data loading for books in CsvDataLoader #306

Closed
wants to merge 5 commits into from

Conversation

kjknows
Copy link
Contributor

@kjknows kjknows commented Mar 27, 2024

Added functionality to CsvDataLoader to load data for books from the provided. Implemented book details such as title, ISBN, authors, and number of pages from MediaItemModel objects and create Book instances accordingly. This allows CsvDataLoader to handle loading data for books and improves the flexibility of the application.

Added functionality to CsvDataLoader to load data for books from the provided. Implemented  book details such as title, ISBN, authors, and number of pages from MediaItemModel objects and create Book instances accordingly. This allows CsvDataLoader to handle loading data for books and improves the flexibility of the application.
private static final String CSV_FILE_PATH = "src/main/resources/csv/data.csv";

@Override
public LibraryDataModel loadData() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you're on the right track, just need to finish.

}

// Method to create a MediaItemModel object from CSV data
private MediaItemModel createMediaItemFromCsvData(String[] data) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Great idea pulling this method. Good use of the single responsibility principle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants