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

Book class created, bookdao layer implemented #347

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NadVlados
Copy link

No description provided.

import mate.academy.model.Book;

public interface BookDao {

Choose a reason for hiding this comment

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

do not start interface or class with an empty line

Comment on lines 70 to 73
Long id = resultSet.getObject("id", Long.class);
String title = resultSet.getString("title");
BigDecimal price = resultSet.getObject("price", BigDecimal.class);
books.add(new Book(id, title, price));

Choose a reason for hiding this comment

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

create separate method for extracting book from resultSet and reuse it

title VARCHAR(255),
price INT,
PRIMARY KEY (id)
);

Choose a reason for hiding this comment

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

file should end with empty line

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.

3 participants