重写属性的set和get方法,怎么写
发布网友
发布时间:2022-04-11 03:15
我来回答
共1个回答
热心网友
时间:2022-04-11 04:44
给你粘一个我项目的实体类你自己体会一下
public class BloodGlucose {
private String id;// id
private String familyId;// 家庭成员id
private String date;// 记录日期(String)
private String time;// 时刻
private String station;// 时间段
private Float bloodValue;// 血糖值
private String systemResult;// 系统判断
private Date createTime;// 创建时间
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getFamilyId() {
return familyId;
}
public void setFamilyId(String familyId) {
this.familyId = familyId;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getStation() {
return station;
}
public void setStation(String station) {
this.station = station;
}
public Float getBloodValue() {
return bloodValue;
}
public void setBloodValue(Float bloodValue) {
this.bloodValue = bloodValue;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getSystemResult() {
return systemResult;
}
public void setSystemResult(String systemResult) {
this.systemResult = systemResult;
}
}