实体类:
信息的实体类
package com.wmj.entity;
import java.util.Date;
public class Information {
private Integer id;
private Integer tid;
private Infotype infortype;//对象
private String title;
private String content;
private Integer pvCount;
private Date createTime;
private String isPub;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getTid() {
return tid;
}
public void setTid(Integer tid) {
this.tid = tid;
}
public Infotype getInfortype() {
return infortype;
}
public void setInfortype(Infotype infortype) {
this.infortype = infortype;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Integer getPvCount() {
return pvCount;
}
public void setPvCount(Integer pvCount) {
this.pvCount = pvCount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getIsPub() {
return isPub;
}
public void setIsPub(String isPub) {
this.isPub = isPub;
}
@Override
public String toString() {
return "Information [id=" + id + ", tid=" + tid + ", infortype=" + infortype + ", title=" + title + ", content="
+ content + ", pvCount=" + pvCount + ", createTime=" + createTime + ", isPub=" + isPub + "]";
}
public Information(Integer id, Integer tid, Infotype infortype, String title, String content, Integer pvCount,
Date createTime, String isPub) {
super();
this.id = id;
this.tid = tid;
this.infortype = infortype;
this.title = title;
this.content = content;
this.pvCount = pvCount;
this.createTime = createTime;
this.isPub = isPub;
}
public Information() {
super();
// TODO Auto-generated constructor stub
}
}
创建信息类型的实体类
package com.wmj.entity;
public class Infotype {
private Integer tid;
private String tname;
public Integer getTid() {
return tid;
}
public void setTid(Integer tid) {
this.tid = tid;
}
public String getTname() {
return tname;
}
public void setTname(String tname) {
this.tname = tname;
}
@Override
public String toString() {
return