/**
 *  Title  新闻管理系统
 *  @author: 王夕宁
 *  @version 1.0
 *  新闻表中所使用的一些字段
 */
package com.wxpn.tutorial.bean.news;

import java.text.SimpleDateFormat;
import java.util.Date;

public class News {
	private int id;

	private String topic;

	private String content;

	private Date publishtime;

	private String strPublishtime;

	private String publishuser;

	private String picture;

	private int hits;

	private int categoryid;

	public int getCategoryid() {
		return categoryid;
	}

	public void setCategoryid(int categoryid) {
		this.categoryid = categoryid;
	}

	public String getContent() {
		return content;
	}

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

	public int getHits() {
		return hits;
	}

	public void setHits(int hits) {
		this.hits = hits;
	}

	public int getId() {
		return id;
	}

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

	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	public Date getPublishtime() {
		return publishtime;
	}

	public void setPublishtime(Date publishtime) {
		this.publishtime = publishtime;
	}

	public String getPublishuser() {
		return publishuser;
	}

	public void setPublishuser(String publishuser) {
		this.publishuser = publishuser;
	}

	public String getStrPublishtime() {
		if (getPublishtime() != null) {
			SimpleDateFormat simpledate = new SimpleDateFormat(
					"yyyy-MM-dd");
			strPublishtime = simpledate.format(getPublishtime());
		}
		return strPublishtime;
	}

	public void setStrPublishtime(String strPublishtime) {
		this.strPublishtime = strPublishtime;
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

}