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); }*/ }

 

posted @ 2017-06-27 17:11  Rainyn  阅读(4749)  评论(0编辑  收藏  举报