首页 > 代码库 > JavaBean toString方式
JavaBean toString方式
package object;import java.util.Date;public class ReportDataQo implements java.io.Serializable { private static final long serialVersionUID = -597093210983839666L; private Long eventCode; private Date reportDateFrom; private Date reportDateTo; private Byte status; private String reportOrgCode; private Byte reportDeptType; public Long getEventCode() { return eventCode; } public void setEventCode(Long eventCode) { this.eventCode = eventCode; } public Date getReportDateFrom() { return reportDateFrom; } public void setReportDateFrom(Date reportDateFrom) { this.reportDateFrom = reportDateFrom; } public Date getReportDateTo() { return reportDateTo; } public void setReportDateTo(Date reportDateTo) { this.reportDateTo = reportDateTo; } public Byte getStatus() { return status; } public void setStatus(Byte status) { this.status = status; } public String getReportOrgCode() { return reportOrgCode; } public void setReportOrgCode(String reportOrgCode) { this.reportOrgCode = reportOrgCode; } public Byte getReportDeptType() { return reportDeptType; } public void setReportDeptType(Byte reportDeptType) { this.reportDeptType = reportDeptType; }
//方法一:自动生成 @Override public String toString() { return "ReportDataQo [eventCode=" + eventCode + ", reportDateFrom=" + reportDateFrom + ", reportDateTo=" + reportDateTo + ", status=" + status + ", reportOrgCode=" + reportOrgCode + ", reportDeptType=" + reportDeptType + "]"; }
//方法二:序列化/* @Override public String toString() { return com.alibaba.fastjson.JSON.toJSONString(this); }*/ }
JavaBean toString方式
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。