Browse Source

Public methods; add 'existsbyIsbn' method

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.1-alpha
Pekka Helenius 4 years ago
parent
commit
91c4c8f63a
2 changed files with 4 additions and 3 deletions
  1. +3
    -2
      bookstore/src/main/java/com/fjordtek/bookstore/model/BookRepository.java
  2. +1
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/model/CategoryRepository.java

+ 3
- 2
bookstore/src/main/java/com/fjordtek/bookstore/model/BookRepository.java View File

@ -8,7 +8,8 @@ import org.springframework.data.repository.CrudRepository;
public interface BookRepository extends CrudRepository<Book, Long> { public interface BookRepository extends CrudRepository<Book, Long> {
// Handles both INSERT and UPDATE queries
List<Book> findById(String title);
public List<Book> findById(String title);
public boolean existsByIsbn(String isbn);
} }

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

@ -8,6 +8,6 @@ import org.springframework.data.repository.CrudRepository;
public interface CategoryRepository extends CrudRepository<Category, Long> { public interface CategoryRepository extends CrudRepository<Category, Long> {
List<Category> findByName(String name);
public List<Category> findByName(String name);
} }

Loading…
Cancel
Save