BaseEntity.java 994 Bytes
Newer Older
1
package pwc.taxtech.atms.entity;
eddie.woo's avatar
eddie.woo committed
2 3 4 5 6 7 8 9 10

import java.util.Date;

public class BaseEntity {
    private String createBy;
    private String updateBy;
    private Date createTime;
    private Date updateTime;

eddie.woo's avatar
eddie.woo committed
11 12 13 14 15 16
    public BaseEntity() {
        Date now = new Date();
        this.createTime = now;
        this.updateTime = now;
    }

eddie.woo's avatar
eddie.woo committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
eddie.woo's avatar
eddie.woo committed
42
        return updateTime == null ? new Date() : updateTime;
eddie.woo's avatar
eddie.woo committed
43 44 45 46 47 48
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}