Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface BookRepository extends CrudRepository<Book, Integer> {
- @Query("select a from Book a where (a.title=:title or :title is null) AND (a.author=:author or :author is null) AND (a.category=:category or :category is null)")
- List<Book> findBooksByTitleAndAuthorAndCategory(@Param("title") String titleID,@Param("author") String authorID,@Param("category") String categoryID);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement