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

📄 article.java

📁 JAVA+JSP程序系统-华源网络科技论坛
💻 JAVA
字号:
package org.jetic.web.techbbs;import java.sql.ResultSet;import org.jetic.util.Format;import java.text.SimpleDateFormat;/** * Title:        华源技术论坛 * Description: * Copyright:    Copyright (c) 2001 * Company:      GBSOURCE * @author fainter * @version 1.0 */public class Article {    private int boardID = 1;    private String title = "";    private String writer = "";    private String memo = "";    private int icon = 0;    private int re = 0;    private String mark = "";    private String time = "";    private int articleID = 0;    private SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");    public Article() {    }    public Article(int articleID) {        this.setArticleID(articleID);    }    public int getArticleID() {        return articleID;    }    public void setArticleID(int newArticleID) {        this.articleID = newArticleID;        try {            String sql="select fdimain,fdiicon,fdctitle,fdtime,fdcmemo,fdcwriter,fdire,fdcmark from tbtopic where id=?";            Mssql conn = new Mssql(sql);            conn.setInt(1, articleID);            ResultSet rs = conn.executeQuery();            if (rs.next()) {               Format format = new Format();               boardID = rs.getInt("fdimain");               icon = rs.getInt("fdiicon");               title = format.toHtml(rs.getString("fdctitle"));               time = formatter.format(rs.getTimestamp("fdtime"));               memo = format.toHtml(rs.getString("fdcmemo"));               writer = rs.getString("fdcwriter");               re = rs.getInt("fdire");               mark = rs.getString("fdcmark");            }            rs.close();            conn.close();        }        catch (Exception ex) {            ex.printStackTrace(System.err);        }    }    public void setboardID(int newboardID) {        boardID = newboardID;    }    public int getboardID() {        return boardID;    }    public void seticon(int newicon) {        icon = newicon;    }    public int geticon() {        return icon;    }    public void settitle(String newtitle) {        title = newtitle;    }    public String gettitle() {        return title;    }    public void settime(String newtime) {        time = newtime;    }    public String gettime() {        return time;    }    public void setmemo(String newmemo) {        memo = newmemo;    }    public String getmemo() {        return memo;    }    public void setwriter(String newwriter) {        writer = newwriter;    }    public String getwriter() {        return writer;    }    public void setre(int newre) {        re = newre;    }    public int getre() {        return re;    }    public void setmark(String newmark) {        mark = newmark;    }    public String getmark() {        return mark;    }}

⌨️ 快捷键说明

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