china-code.net.wwnsx.4524.rar

  • fongyau
    了解作者
  • JavaScript
    开发工具
  • 109KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 5
    下载次数
  • 2005-08-05 07:32
    上传日期
特色说明: 1.沿袭今晚在线论坛独有的双风格分桢形式 2.社区最多可进行3级分类,大部分论坛应该够用了 3.多种发帖类型: 普通帖、积分浏览帖、金钱购买帖、散分(求助)帖、 回复可见帖 4.更贴心得发帖辅助功能,可自动识别URL和图片 5.采用类似今晚在线文章系统的后台管理等级无限级自定义分类,真正适合多用户管理 6.其它基本具备了GVbbs v5.0的全部功能这里不再敖述 用户名gamvan 密码为
china-code.net.wwnsx.4524.rar
内容介绍
package com.gamvan.sql; import java.sql.*; public class PageableResultSet2 implements Pageable { protected java.sql.ResultSet rs=null; protected int rowsCount; protected int pageSize ; protected int curPage; protected String command = "" ; public PageableResultSet2(java.sql.ResultSet rs) throws java.sql.SQLException { if(rs==null) throw new SQLException("given ResultSet is NULL","user"); rs.last(); rowsCount=rs.getRow(); rs.beforeFirst(); this.rs=rs; } public PageableResultSet2(java.sql.ResultSet rs, String command) throws java.sql.SQLException { if(rs==null) throw new SQLException("given ResultSet is NULL","user"); rs.last(); rowsCount=rs.getRow(); rs.beforeFirst(); this.rs=rs; this.command = command; } public int getCurPage() { return curPage; } ////////////////////////// public java.net.URL getURL(String columnName) throws SQLException{ return rs.getURL(columnName); } public java.net.URL getURL(int columnName) throws SQLException{ return rs.getURL(columnName); } ///////////////////////////////// public int getPageCount() { if(rowsCount==0) return 0; if(pageSize==0) return 1; //calculate PageCount double tmpD=(double)rowsCount/pageSize; int tmpI=(int)tmpD; if(tmpD>tmpI) tmpI++; return tmpI; } public int getPageRowsCount() { if(pageSize==0) return rowsCount; if(getRowsCount()==0) return 0; if(curPage!=getPageCount()) return pageSize; return rowsCount-(getPageCount()-1)*pageSize; } public int getPageSize() { return pageSize; } public int getRowsCount() { return rowsCount; } public void gotoPage(int page) { if (rs == null) return; if (page < 1) page = 1; if (page > getPageCount()) page = getPageCount(); int row = (page - 1) * pageSize + 1; try { rs.absolute(row); curPage = page; } catch (java.sql.SQLException e) { } } public void pageFirst() throws java.sql.SQLException { int row=(curPage-1)*pageSize+1; rs.absolute(row); } public void pageLast() throws java.sql.SQLException { int row=(curPage-1)*pageSize+getPageRowsCount(); rs.absolute(row); } public void setPageSize(int pageSize) { if(pageSize>=0){ this.pageSize=pageSize; curPage=1; } } //============================================================================ public boolean absolute(int row) throws SQLException { return rs.absolute(row); } public void afterLast() throws SQLException { rs.afterLast(); } public void beforeFirst() throws SQLException { rs.beforeFirst(); } public void cancelRowUpdates() throws SQLException { rs.cancelRowUpdates(); } public void clearWarnings() throws SQLException { rs.clearWarnings(); } public void close() throws SQLException { rs.close(); } public void deleteRow() throws SQLException { rs.deleteRow(); } public int findColumn(String columnName) throws SQLException { try { return rs.findColumn(columnName); } catch (SQLException e) { throw new SQLException(e.toString()+ "/"+columnName + "/"+this.getCommand()); } } public boolean first() throws SQLException { return rs.first(); } public Array getArray(int i) throws SQLException { try { return rs.getArray(i); } catch (SQLException e) { throw new SQLException (e.getMessage()+" column Index="+i +"\r\nSQL="+this.getCommand()); } } public Array getArray(String colName) throws SQLException { try { return rs.getArray(colName); } catch (SQLException e) { throw new SQLException (e.getMessage()+" columnName="+colName +"\r\nSQL="+this.getCommand()); } } public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException { try { return rs.getAsciiStream(columnIndex); } catch (SQLException e) { throw new SQLException (e.getMessage()+" column Index="+columnIndex +"\r\nSQL="+this.getCommand()); } } public java.io.InputStream getAsciiStream(String columnName) throws SQLException{ try { return rs.getAsciiStream(columnName); } catch (SQLException e) { throw new SQLException (e.getMessage()+" columnName="+columnName +"\r\nSQL="+this.getCommand()); } } public java.math.BigDecimal getBigDecimal(int columnIndex) throws SQLException { try { return rs.getBigDecimal(columnIndex); } catch (SQLException e) { throw new SQLException (e.getMessage()+" column Index="+columnIndex +"\r\nSQL="+this.getCommand()); } } public java.math.BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { throw new SQLException("Deprecated Method, Don't Call it!","user"); } public java.math.BigDecimal getBigDecimal(String columnName) throws SQLException { try { return rs.getBigDecimal(columnName); } catch (SQLException e) { throw new SQLException (e.getMessage()+" columnName="+columnName +"\r\nSQL="+this.getCommand()); } } public java.math.BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { throw new SQLException("Deprecated Method, Don't Call it!","user"); } public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException{ try { return rs.getBinaryStream(columnIndex); } catch (SQLException e) { throw new SQLException (e.getMessage()+" column Index="+columnIndex +"\r\nSQL="+this.getCommand()); } } public java.io.InputStream getBinaryStream(String columnName) throws SQLException { try { return rs.getBinaryStream(columnName); } catch (SQLException e) { throw new SQLException (e.getMessage()+" columnName="+columnName +"\r\nSQL="+this.getCommand()); } } public Blob getBlob(int columnIndex) throws SQLException { try { return rs.getBlob(columnIndex); } catch (SQLException e) { throw new SQLException (e.getMessage()+" column Index="+columnIndex +"\r\nSQL="+this.getCommand()); } } public Blob getBlob(String colName) throws SQLException{ try { return rs.getBlob(colName); } catch (SQLException e) { throw new SQLException (e.getMessage()+" columnName="+colName +"\r\nSQL="+this.getCommand()); } } public boolean getBoolean(int columnIndex) throws SQLException { try { return rs.getBoolean(columnIndex); } catch (SQLException e) { throw new SQLException (e.getMessage()+" column Index="+columnIndex +"\r\nSQL="+this.getCommand()); } } public boolean getBoolean(String columnName) throws SQLException { try { return rs.getBoolean(columnName); } catch (SQLException e) { throw new SQLException (e.getMessage()+" columnName="+columnName +"\r\nSQL="+this.getCommand()); } } public byte getByte(int columnIndex) throws SQLException { try { return rs.getByte(columnIndex); } catch (SQLException e) { throw new SQLException (e.getMessage()+" column Index="+columnIndex +"\r\nSQL="+this.getCommand()); } } public byte getByte(String columnName) throws SQLException{ try { return rs.getByte(columnName); } catch (SQLException e) { throw new SQLException (e.getMessage()+" columnName="+columnName +"\r\nSQL="+this.getCommand()); } } public byte[] getBytes(int columnIndex) throws SQLException {
评论
    相关推荐
    • 网上在线论坛
      网上在线论坛主要的功能是讨论各种语言的开发技术、技巧,并交流开发经验等,但是需要对技术栏目的文章浏览和发表文章功能加以限制,这样,论坛的管理功能显得尤为重要,除此之外,还需要将用户划分为不同级别,根据...
    • 网上在线论坛
      网上在线论坛便于大家交流!此任务是使用三层架构技术开发的!!
    • asp在线论坛
      实例文件夹:mingrisoft\在线论坛。 数据库:采用Access数据库,名称为db_bbs.mdb。 数据库文件位置:mingrisoft\在线论坛\DataBase\db_bbs.mdb 数据连接文件:在线论坛\Include\conn.asp 后台管理员...
    • 网上在线论坛
      ASP.NET+SQL SERVER技术编写的web网站应用程序!!!
    • 在线论坛功能
      asp写的在线交流论坛功能,简单实用! 可以放在根目录或子目录,不用任何修改即可正常运行! 下载最新版本后,上传覆盖即可!(请先备份数据库,然后覆盖新版的数据库!) 请确保你的空间支持FSO,否则可能有些功能无法...
    • 网络在线论坛
      asp.net,sql制作的简单网络论坛适合初学者进行学习
    • XMLBBS在线论坛
      本程序有三种操作用户:分别为普通用户、会员和管理员。 进入程序主页面后,即为普通用户,可以查看贴子内容,...在左侧树状导航按钮中单击“会员登录”或“管理员登录”按钮,即可进入会员操作界面或管理员操作界面;... ...
    • 网上在线论坛
      网上在线论坛 asp.net vs2008 + sql数据库
    • 网上在线论坛
      网上在线论坛 ASP.NET3.5+SQL Server2005+PowerDesigner
    • 在线论坛管理
      在线论坛的管理与实现,运用C#语言,涉及用户自定控件的使用。