From 84f58b706eb19e4f01994c47c65eadbefb7e31eb Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Sat, 3 Oct 2020 03:59:52 +0300 Subject: [PATCH] Rename method: updateWithoutPrice -> updateWithoutPriceAndWithoutPublish Signed-off-by: Pekka Helenius --- .../com/fjordtek/bookstore/model/book/BookRepositoryCustom.java | 2 +- .../com/fjordtek/bookstore/model/book/BookRepositoryImpl.java | 2 +- .../main/java/com/fjordtek/bookstore/web/BookController.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java index a8ce905..d88cae7 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java @@ -9,7 +9,7 @@ import java.util.List; public interface BookRepositoryCustom { - void updateWithoutPrice(Book book); + void updateWithoutPriceAndWithoutPublish(Book book); List findAllPublished(); } \ No newline at end of file diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java index e2d248a..c45db30 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java @@ -25,7 +25,7 @@ public class BookRepositoryImpl implements BookRepositoryCustom { * Hibernate takes care of entityManager transactions (begin, commit, rollback, close, etc.) */ @Override - public void updateWithoutPrice(Book book) { + public void updateWithoutPriceAndWithoutPublish(Book book) { try { diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java index 22eae35..d207808 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java @@ -354,7 +354,7 @@ public class BookController { bookAuthorHelper.detectAndSaveUpdateAuthorForBook(book); if (book.getPrice() == null) { - bookRepository.updateWithoutPrice(book); + bookRepository.updateWithoutPriceAndWithoutPublish(book); } else { bookRepository.save(book); }