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

📄 carticle.java

📁 自己写的一个网络日志(BLOG)系统
💻 JAVA
字号:
package blog;
/**
 * 
 * <p>Title: CArticle</p>
 * <p>Description:文章类 </p>
 * <p>Copyright: copyright (c) 2005-2005</p>
 * <p>Company: </p>
 * @author Administrator
 * @version 1.0.00_01
 */
public class CArticle {
	private int artID;

	private int cataID;

	private int userID;

	private int postYear;
	
	private int postMonth;

	private int postDay;

	private String postTime;

	private String artContent;

	private String artIntro;
	
	private String artTitle;

	public String getArtContent() {
		return artContent;
	}

	public void setArtContent(String artContent) {
		this.artContent = artContent;
	}

	public int getArtID() {
		return artID;
	}

	public void setArtID(int artID) {
		this.artID = artID;
	}

	public String getArtTitle() {
		return artTitle;
	}

	public void setArtTitle(String artTitle) {
		this.artTitle = artTitle;
	}

	public String getArtIntro() {
		return artIntro;
	}

	public void setArtIntro(String artIntro) {
		this.artIntro = artIntro;
	}

	public int getCataID() {
		return cataID;
	}

	public void setCataID(int cataID) {
		this.cataID = cataID;
	}

	public String getPostTime() {
		return postTime;
	}

	public void setPostTime(String postTime) {
		this.postTime = postTime;
	}

	public int getUserID() {
		return userID;
	}

	public void setUserID(int userID) {
		this.userID = userID;
	}

	public int getPostDay() {
		return postDay;
	}

	public void setPostDay(int postDay) {
		this.postDay = postDay;
	}

	public int getPostMonth() {
		return postMonth;
	}

	public void setPostMonth(int postMonth) {
		this.postMonth = postMonth;
	}

	public int getPostYear() {
		return postYear;
	}

	public void setPostYear(int postYear) {
		this.postYear = postYear;
	}
	
	public String  makeArticle() throws Exception{
		String str = "";
		str = str +"<DIV class=\"post cate1 auth1\">";
		str = str +"<H4 class=post-date>"+postYear+"-"+postMonth+"-"+postDay+" "+postTime+"</H4>";
		str = str +"<H2 class=post-title>"+artTitle+"</H2>";
		str = str +"<DIV class=post-body>"+CStringEncoder.htmlEncoder(artContent)+"</DIV>";
		CCataDAO cataDao = CCataDAO.newInstance();
		CUserDAO userDao = CUserDAO.newInstance();
		String cataName = cataDao.queryByID(this.cataID);
		String userName = userDao.queryByID(this.userID);
		str = str +"<H6 class=post-footer>发布:"+userName+" | 分类:"+cataName+" </H6></DIV>";
		
		return str;
	}
}

⌨️ 快捷键说明

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