Message This class
Package Com.hanqi.model;import java.util.date;//Message This object public class message {private Integer id;//message ID private String content;//message Content Private Date createtime;//message time private String username;//message user name public message (Integer ID, String Content, Date Createtime, String username) {super (); This.id = ID; this.content = content; This.createtime = Createtime; This.username = Username; } public Message () {super (); } public Integer GetId () {return id; } public void SetId (Integer id) {this.id = ID; } public String GetContent () {return content; The public void SetContent (String content) {this.content = content; Public Date Getcreatetime () {return createtime; } public void Setcreatetime (Date createtime) {this.createtime = Createtime; } public String GetUserName () {return username; } public void Setusername (String username) {ThiS.username = Username; } }
User Classes
Package Com.hanqi.model;import java.util.date;//User Object public class users {private Integer ID;//user Idprivate String username;//User name private string password;//user password private string realname;//user real name private Date createtime;//user registration Time private The integer mark;//user effectively marks the public users (integer ID, string username, string password, string realname, Date createtime, Integer Mark) {super (); this.id = Id;this.username = Username;this.password = Password;this.realname = Realname;this.createtime = Createtime;this.mark = Mark;} Public Users () {super ();} Public Integer GetId () {return ID;} public void SetId (Integer id) {this.id = ID;} Public String GetUserName () {return username;} public void Setusername (String username) {this.username = username;} Public String GetPassword () {return password;} public void SetPassword (String password) {this.password = password;} Public String Getrealname () {return realname;} public void Setrealname (String realname) {this.realname = Realname;} Public Date Getcreatetime () {return createtime;} PublIC void Setcreatetime (Date createtime) {this.createtime = Createtime;} Public Integer Getmark () {return mark;} public void Setmark (Integer mark) {This.mark = Mark;} @Overridepublic String toString () {return username;}}
JAVA Web Basic message book comprehensive exercises