JSP_网上搜集的分页及example搜索相关代码(4)
发布时间:2021-06-07
发布时间:2021-06-07
public void setBook_publishTime(String book_publishTime) { this.book_publishTime = book_publishTime;
}
public String getBook_synopsis() { return book_synopsis;
}
public void setBook_synopsis(String book_synopsis) { this.book_synopsis = book_synopsis; }
}
3. 分页查询代码:
package com.book.pagin;
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List;
import mons.GetConnection; import com.book.entity.Book;
public class BookPaginQuery extends GetConnection { private final int PAGEROW = 8;//每页显示的行数
private int countRow;//总行数
private int countPage;//总页数
private int currentlyPage;//当前第几页 /**
* 得到总页数 * @return */
public int getCountPage() { return countPage;
}
上一篇:独放的生命