📄 bookdao.java
字号:
package org.wiely.dao;
import java.util.List;
import org.wiely.vo.Book;
/**
* the interface is the BookDAO the bookDAO provides most opration with Book of
* value object
*/
public interface BookDAO {
/**
* @see get all new Books
* @return List
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List getNewBooks() throws Exception;
/**
* @see query all books from Book
* @return List
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List queryAllBooks(int currentPage, int pageSize) throws Exception;
/**
* @see query books by bookname
* @param bookname
* @return List
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List queryBooksByName(String bookname, int currentPage, int pageSize)
throws Exception;
/**
* @see update Book
* @param book
* @throws Exception
*/
public void updateBook(Book book) throws Exception;
/**
* @see insert Book
* @param book
* @throws Exception
*/
public void insertBook(Book book) throws Exception;
/**
* @see delete Book by bookisbn
* @param bookisbn
* @throws Exception
*/
public void delBook(int bookid) throws Exception;
/**
* @see query Book by bookisbn
* @param bookisbn
* @return Book
* @throws Exception
*/
public Book queryBookByBookisbn(String bookisbn) throws Exception;
/**
*
* @param adminid
* @return List
* @throws Exception
*/
@SuppressWarnings("unchecked")
public List queryBooksByAdminid(int adminid, int currentPage, int pageSize)
throws Exception;
/**
*
* @return int
* @throws Exception
* @see getTotalRecord from database
*/
public int getTotalRecords() throws Exception;
/**
*
* @return int
* @throws Exception
* @see getTotalRecord from database
*/
public int getTotalRecordsBybookname(String bookname) throws Exception;
/**
*
* @return int
* @throws Exception
* @see getTotalRecord from database
*/
public int getTotalRecordsByadminid(int adminid) throws Exception;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -