Struts 2.1.6 精简实例系列教程(3):新闻管理Model层的开发(整合iBatis)
2009-09-23 00:00:00 来源:WEB开发网这是我们常见的新闻表及其中的字段。
接下来,写一个与表对应的新闻类,Article.java,这个其实是POJO类,代码如下:
package cn.simple.pojo;
import java.util.Date;
public class Article {
private int id;
private String title;
private String author;
private String content;
private Date pubtime;
/** *//***********getter和setter方法***********/
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;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Date getPubtime() {
return pubtime;
}
public void setPubtime(Date pubtime) {
this.pubtime = pubtime;
}
}
更多精彩
赞助商链接