⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page.java

📁 用最近的dojo1.2.1制作前端的ajax购书网站
💻 JAVA
字号:
package server.books;
import server.database.Operation;
import java.util.*;
import java.sql.*;
/**
 * @author user
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class page {
	operateDbBook db=new operateDbBook();
	private int wholePage=20;
	private int results=0;
	private int resultLength=0;
 	private int content=searchData.getContent();
	private static boolean calculated=false;
  
	


	
	public int getWholePage(String sql) 
	throws SQLException,InstantiationException,IllegalAccessException,ClassNotFoundException
	{	getResultLength(sql);
		if(resultLength%content==0)
		wholePage=resultLength/content;
		else
		wholePage=resultLength/content+1;
		//System.out.println(wholePage);//
		return wholePage;
	}

	

	
	public int getContent() {
		return content;
	}

	
	
	
	public int getResultLength(String sql) 
	throws SQLException,InstantiationException,IllegalAccessException,ClassNotFoundException
	
	{	 
			resultLength=db.CalSize(sql);
			calculated=true;
		 
		return resultLength;
	}

	/**
	 * Sets the resultLength.
	 * @param resultLength The resultLength to set
	 */
	
	
	

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -