entity层

entity层,第1张

user.java主要代码
public class user {
//定义用户的四个属性
    private int uid;//用户id
    private String uname;//用户名
    private String upwd;//密码
    private int oid;//旧用户id(update用)


 /**
 * oid构造方法,主要为修改用户信息的时候传递参数
 */
    public user(int uid, String uname, String upwd, int oid) {
        this.uid = uid;
        this.uname = uname;
        this.upwd = upwd;
        this.oid = oid;
    }

    @Override
    public String toString() {
        return "user{" +
                "uid=" + uid +
                ", uname='" + uname + '\'' +
                ", upwd='" + upwd + '\'' +
                '}';
    }
 /**
 * 构造方法,主要为删除用户信息的时候传递参数
 */
    public user(int uid) {
        this.uid = uid;
    }
 /**
 * 构造方法,主要为增加用户信息的时候传递参数
 */
    public user(int uid, String uname, String upwd) {
        this.uid = uid;
        this.uname = uname;
        this.upwd = upwd;
    }

    public user() {
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getUpwd() {
        return upwd;
    }

    public void setUpwd(String upwd) {
        this.upwd = upwd;
    }
  
    public int getOid() {
        return oid;
    }

    public void setOid(int oid) {
        this.oid = oid;
    }
}

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/874506.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存