topic.java

来自「关于java面向对象系统分析方面的课件」· Java 代码 · 共 38 行

JAVA
38
字号
/*
 * s2jsp.lg.entity.Topic.java
 * 2007-7-18
 * 主题类
 */
package s2jsp.lg.entity;

public class Topic extends Tip {
    private int topicId = 1;  // 唯一标志主题的id
    private int boardId = 1;  // 引用板块的id,用来表示该帖子是哪个板块的
    
    /**
     * 输出当前主题的信息
     */
    public void getInfo(){
        System.out.println("====主题信息====");
        System.out.println("主题标题:" + this.getTitle());
        System.out.println("主题内容:" + this.getContent());
        System.out.println("发表时间:" + this.getPublishTime() + "\n");
    }

    public int getTopicId() {
        return topicId;
    }
    
    public void setTopicId(int topicId) {
        this.topicId = topicId;
    }
    
    public int getBoardId() {
        return boardId;
    }
    
    public void setBoardId(int boardId) {
        this.boardId = boardId;
    }
}

⌨️ 快捷键说明

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