package com.wxpn.tutorial.servlet;

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

/**
 * ÃèÊö: ÃèÊöÐÅÏ¢Àà
 * 
 * @Copyright (c) 2005-2008 Wang Xining
 * @author ÍõÏ¦Äþ
 * @version 1.0
 */

public class News {
	private int id;

	private String title;

	private String content;

	private String author;

	private Date compose_date;

	private String strCompose_date;

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public Date getCompose_date() {
		return compose_date;
	}

	public void setCompose_date(Date compose_date) {
		this.compose_date = compose_date;
	}

	public String getStrCompose_date() {
		// String strCompose_date = "";
		// if (getCompose_date() != null) {
		// SimpleDateFormat simpledate = new SimpleDateFormat(
		// "yyyy-MM-dd HH:mm:ss");
		// strCompose_date = simpledate.format(getCompose_date());
		// }
		if (strCompose_date == null) {
			SimpleDateFormat simpledate = new SimpleDateFormat(
					"yyyy-MM-dd HH:mm:ss");
			strCompose_date = simpledate.format(getCompose_date());
		}
		return strCompose_date;
	}

	public void setStrCompose_date(String strCompose_date) {
		this.strCompose_date = strCompose_date;
	}

	public String getContent() {
		return content;
	}

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

	public int getId() {
		return id;
	}

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

	public String getTitle() {
		return title;
	}

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