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

📄 forumnews.java

📁 一个用jsp写的完整的论坛源代码
💻 JAVA
字号:
package com.bcxy.bbs.forum;

/**
 * Title:
 * Description:
 * Copyright:
 * Company: www.liyunet.com
 * 
 * @author lishujiang	
 * @version 1.0
 */

import com.bcxy.bbs.util.BBSConst;
import com.bcxy.db.JdbcWrapper;

public class ForumNews {
	private int id, boardid;

	private String title, content, username, addtime;

	public ForumNews() {
	}

	public ForumNews(int newsid) throws ForumNewsNotFoundException, Exception {
		JdbcWrapper jw = new JdbcWrapper("select * from " + BBSConst.TABLE_BBSNEWS
				+ " where id='" + newsid + "' order by id desc");
		if (jw.next()) {
			this.id = jw.getInt(1);
			this.boardid = jw.getInt(2);
			this.title = jw.getString(3);
			this.content = jw.getString(4);
			this.username = jw.getString(5);
			this.addtime = jw.getString(6);
		} else {
			throw new ForumNewsNotFoundException("没有找到论坛公告!ID=" + newsid);
		}
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getBoardid() {
		return this.boardid;
	}

	public void setBoardid(int boardid) {
		this.boardid = boardid;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getUserName() {
		return this.username;
	}

	public void setUserName(String username) {
		this.username = username;
	}

	public String getAddTime() {
		return this.addtime;
	}

	public void setAddTime(String addtime) {
		this.addtime = addtime;
	}
}

⌨️ 快捷键说明

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