src/com/bar/page/SplitPage.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bar.page;
/**
*
* @author asus
*/
import java.sql.*;
import java.util.*;
public class SplitPage
{
//定义结果集对象
private ResultSet rs=null;
private ResultSetMetaData rsmd=null;
//总记录数目
private int rowCount;
//所分的逻辑页数
private int pageCount;
//每页显示的记录数目
private int pageSize;
//初始化,获取数据表中的信息
public void initialize(ResultSet rs,int pageSize)
{
this.pageSize=pageSize;
try
{
this.rs=rs;
this.rsmd=this.rs.getMetaData();
if (this.rs!=null)
{
this.rs.last();
this.rowCount = this.rs.getRow();
this.rs.first();
this.pageCount = (this.rowCount - 1) / this.pageSize + 1;
}
else
{
this.rowCount=0;
}
}
catch(SQLException e)
{
System.out.println(e.toString());
}
}
//将显示结果存到Vector集合类中
public Vector getPage(int ipage)
{
Vector vData=new Vector();
int n=ipage;
int m=0;
后面还有 44 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。