Browse Source

Rename method: updateWithoutPrice -> updateWithoutPriceAndWithoutPublish

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.3-alpha
Pekka Helenius 4 years ago
parent
commit
84f58b706e
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java
  2. +1
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java
  3. +1
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java

+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java View File

@ -9,7 +9,7 @@ import java.util.List;
public interface BookRepositoryCustom { public interface BookRepositoryCustom {
void updateWithoutPrice(Book book);
void updateWithoutPriceAndWithoutPublish(Book book);
List<Book> findAllPublished(); List<Book> findAllPublished();
} }

+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java View File

@ -25,7 +25,7 @@ public class BookRepositoryImpl implements BookRepositoryCustom {
* Hibernate takes care of entityManager transactions (begin, commit, rollback, close, etc.) * Hibernate takes care of entityManager transactions (begin, commit, rollback, close, etc.)
*/ */
@Override @Override
public void updateWithoutPrice(Book book) {
public void updateWithoutPriceAndWithoutPublish(Book book) {
try { try {


+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java View File

@ -354,7 +354,7 @@ public class BookController {
bookAuthorHelper.detectAndSaveUpdateAuthorForBook(book); bookAuthorHelper.detectAndSaveUpdateAuthorForBook(book);
if (book.getPrice() == null) { if (book.getPrice() == null) {
bookRepository.updateWithoutPrice(book);
bookRepository.updateWithoutPriceAndWithoutPublish(book);
} else { } else {
bookRepository.save(book); bookRepository.save(book);
} }


Loading…
Cancel
Save