java 关于封装jdbc操作接口的一些做法

首先建立如下图所示的包结构:
然后首先件里模型model包下的两个类:
package model;

public abstract class Bean {
   
}

下面是User类的代码:
package model;

import java.util.Date;

public class User extends Bean{
private Integer id;
private String name;
private String password;
private String sex;
private String email;
private String pwdQuestion;
private String pwdAnswer;
private Date regDate;
private String lastLoginDate;
private String lastLoginIp;

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}

public String getSex() {
return sex;
}

public void setSex(String sex) {
this.sex = sex;
}

public S

你可能感兴趣的:(java)