25 lines
525 B
Java
25 lines
525 B
Java
package com.mzh.library.dao;
|
|
|
|
import com.mzh.library.entity.Book;
|
|
import com.mzh.library.entity.BookCategory;
|
|
import com.mzh.library.entity.BookSearchCriteria;
|
|
|
|
import java.util.List;
|
|
import java.util.Optional;
|
|
|
|
public interface BookDao {
|
|
List<BookCategory> findAllCategories();
|
|
|
|
List<Book> search(BookSearchCriteria criteria);
|
|
|
|
Optional<Book> findById(long id);
|
|
|
|
Optional<Book> findByIdentifier(String identifier);
|
|
|
|
long create(Book book);
|
|
|
|
boolean update(Book book);
|
|
|
|
boolean delete(long id);
|
|
}
|