news.java
来自「基于JSP的家电连锁超市管理系统 数据库也在文件内」· Java 代码 · 共 75 行
JAVA
75 行
package electric.dbs;
/*News.java中有两个方法帮助数据的传递,
*分别设置数据及读取数据*/
public class News
{
//与数据表中的字段相对应的存储数据的模型
private int Id;
private String Motif;
private String Kithepeople;
private String Content;
private String Createdate;
private int Createpeople;
private int Status;
//定义对应的get()方法
public int getId()
{
return this.Id;
}
public String getMotif()
{
return this.Motif;
}
public String getKithepeople()
{
return this.Kithepeople;
}
public String getContent()
{
return this.Content;
}
public String getCreatedate()
{
return this.Createdate;
}
public int getCreatePeople()
{
return this.Createpeople;
}
public int getStatus()
{
return this.Status;
}
//定义对应的set()方法
public void setId(int Id)
{
this.Id=Id;
}
public void setMotif(String Motif)
{
this.Motif=Motif;
}
public void setKithepeople(String Kithepeople)
{
this.Kithepeople=Kithepeople;
}
public void setContent(String Content)
{
this.Content=Content;
}
public void setCreatedate(String Createdate)
{
this.Createdate=Createdate;
}
public void setCreatepeople(int Createpeople)
{
this.Createpeople=Createpeople;
}
public void setStatus(int Status)
{
this.Status=Status;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?