|
@ -2,13 +2,14 @@ |
|
|
|
|
|
|
|
|
package com.fjordtek.bookstore.model; |
|
|
package com.fjordtek.bookstore.model; |
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
|
import org.springframework.data.repository.CrudRepository; |
|
|
import org.springframework.data.repository.CrudRepository; |
|
|
|
|
|
|
|
|
public interface BookRepository extends CrudRepository<Book, Long> { |
|
|
public interface BookRepository extends CrudRepository<Book, Long> { |
|
|
|
|
|
|
|
|
public List<Book> findById(String title); |
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Optional<Book> findById(Long id); |
|
|
|
|
|
|
|
|
/* Assume a single book with a single ISBN, or multiple books with possibly duplicate ISBNs? |
|
|
/* Assume a single book with a single ISBN, or multiple books with possibly duplicate ISBNs? |
|
|
* For meanwhile, we have a UNIQUE constraint for ISBN values. If this policy changes, |
|
|
* For meanwhile, we have a UNIQUE constraint for ISBN values. If this policy changes, |
|
|