Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ForumLinkFactory.java
Package: 第4章 BBS论坛系统.rar [view]
Upload User: yuyunping
Upload Date: 2013-03-21
Package Size: 1844k
Code Size: 2k
Category:
Java Books
Development Platform:
Java
- package net.acai.forum;
- /**
- * Title: 清清网络
- * Description:
- * Copyright: Copyright (c) 2002
- * Company: www.SuperSpace.com
- * @author: SuperSpace
- * @version 1.0
- */
- import java.sql.ResultSet;
- import java.util.Vector;
- import net.acai.database.*;
- import net.acai.forum.ForumLinkNotFoundException;
- public class ForumLinkFactory{
- public static Vector getForumLinks() throws ForumLinkNotFoundException{
- try{
- DBConnect dbc=new DBConnect("select * from bbs.bbslink order by id");
- ResultSet rs=dbc.executeQuery();
- Vector forumLinkVector=new Vector();
- while(rs.next()){
- ForumLink tempLink=new ForumLink();
- tempLink.setLinkID(rs.getInt(1));
- tempLink.setForumName(rs.getString(2));
- tempLink.setReadMe(rs.getString(3));
- tempLink.setForumURL(rs.getString(4));
- forumLinkVector.add(tempLink);
- }
- dbc.close();
- return forumLinkVector;
- }
- catch(Exception e){
- e.printStackTrace();
- throw new ForumLinkNotFoundException();
- }
- }
- public static ForumLink getForumLink(int forumLinkID) throws Exception{
- DBConnect dbc=new DBConnect("select * from bbs.bbslink where id="+forumLinkID);
- ResultSet rs=dbc.executeQuery();
- if(!rs.next())
- throw new Exception("对不起,没有发现此联盟论坛!");
- //rs.next();
- ForumLink tempLink=new ForumLink();
- tempLink.setLinkID(rs.getInt(1));
- tempLink.setForumName(rs.getString(2));
- tempLink.setReadMe(rs.getString(3));
- tempLink.setForumURL(rs.getString(4));
- dbc.close();
- return tempLink;
- }
- }