public abstract class BookRepository extends java.lang.Object implements CrudRepository<Book,java.lang.Long>
Modifier and Type | Field and Description |
---|---|
protected AuthorRepository |
authorRepository |
Constructor and Description |
---|
BookRepository(AuthorRepository authorRepository) |
Modifier and Type | Method and Description |
---|---|
abstract int |
countByTitleIsEmpty() |
abstract int |
countByTitleIsNotEmpty() |
abstract void |
deleteByTitleIsEmptyOrTitleIsNull() |
abstract java.util.List<Book> |
findAllByTitleStartingWith(java.lang.String text) |
abstract java.util.List<Book> |
findByAuthorIsNotNull() |
abstract java.util.List<Book> |
findByAuthorIsNull() |
abstract java.util.List<Book> |
findByAuthorName(java.lang.String name) |
abstract Book |
findByTitle(java.lang.String title) |
abstract java.util.stream.Stream<Book> |
findTop3ByAuthorNameOrderByTitle(java.lang.String name) |
abstract java.util.List<Book> |
findTop3OrderByTitle() |
protected Author |
newAuthor(java.lang.String name) |
protected Book |
newBook(Author author,
java.lang.String title,
int pages) |
void |
setupData() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findById, save, saveAll
protected final AuthorRepository authorRepository
public BookRepository(AuthorRepository authorRepository)
public abstract java.util.List<Book> findAllByTitleStartingWith(java.lang.String text)
public abstract java.util.List<Book> findByAuthorIsNull()
public abstract java.util.List<Book> findByAuthorIsNotNull()
public abstract int countByTitleIsEmpty()
public abstract int countByTitleIsNotEmpty()
public abstract java.util.List<Book> findByAuthorName(java.lang.String name)
public abstract java.util.List<Book> findTop3OrderByTitle()
public abstract java.util.stream.Stream<Book> findTop3ByAuthorNameOrderByTitle(java.lang.String name)
public abstract void deleteByTitleIsEmptyOrTitleIsNull()
public abstract Book findByTitle(java.lang.String title)
public void setupData()
protected Author newAuthor(java.lang.String name)