ProductSpecInfo.java

package com.mycim.valueobject.prp;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author Qiansheng.Wang
 * @since 2020-10-26
 */
public class ProductSpecInfo implements Serializable, Comparable<ProductSpecInfo> {

    private Long productRrn;

    private String productId;

    private Integer productVersion;

    private Long processRrn;

    private String processId;

    private Integer processVersion;

    private Boolean activeFlag;

    private Timestamp activeTime;

    private String activeUser;

    private String currentStatus;

    private String lastUpdatedUser;

    private Timestamp lastUpdatedTime;

    private String createUserId;

    private Timestamp createTime;

    private Boolean oldSpecFlag = false;

    /**
     * @return the productRrn
     */
    public Long getProductRrn() {
        return productRrn;
    }

    /**
     * @param productRrn the productRrn to set
     */
    public void setProductRrn(Long productRrn) {
        this.productRrn = productRrn;
    }

    /**
     * @return the productId
     */
    public String getProductId() {
        return productId;
    }

    /**
     * @param productId the productId to set
     */
    public void setProductId(String productId) {
        this.productId = productId;
    }

    /**
     * @return the productVersion
     */
    public Integer getProductVersion() {
        return productVersion;
    }

    /**
     * @param productVersion the productVersion to set
     */
    public void setProductVersion(Integer productVersion) {
        this.productVersion = productVersion;
    }

    /**
     * @return the processRrn
     */
    public Long getProcessRrn() {
        return processRrn;
    }

    /**
     * @param processRrn the processRrn to set
     */
    public void setProcessRrn(Long processRrn) {
        this.processRrn = processRrn;
    }

    /**
     * @return the processId
     */
    public String getProcessId() {
        return processId;
    }

    /**
     * @param processId the processId to set
     */
    public void setProcessId(String processId) {
        this.processId = processId;
    }

    /**
     * @return the processVersion
     */
    public Integer getProcessVersion() {
        return processVersion;
    }

    /**
     * @param processVersion the processVersion to set
     */
    public void setProcessVersion(Integer processVersion) {
        this.processVersion = processVersion;
    }

    /**
     * @return the activeFlag
     */
    public Boolean getActiveFlag() {
        return activeFlag;
    }

    /**
     * @param activeFlag the activeFlag to set
     */
    public void setActiveFlag(Boolean activeFlag) {
        this.activeFlag = activeFlag;
    }

    /**
     * @return the activeTime
     */
    public Timestamp getActiveTime() {
        return activeTime;
    }

    /**
     * @param activeTime the activeTime to set
     */
    public void setActiveTime(Timestamp activeTime) {
        this.activeTime = activeTime;
    }

    /**
     * @return the activeUser
     */
    public String getActiveUser() {
        return activeUser;
    }

    /**
     * @param activeUser the activeUser to set
     */
    public void setActiveUser(String activeUser) {
        this.activeUser = activeUser;
    }

    /**
     * @return the currentStatus
     */
    public String getCurrentStatus() {
        return currentStatus;
    }

    /**
     * @param currentStatus the currentStatus to set
     */
    public void setCurrentStatus(String currentStatus) {
        this.currentStatus = currentStatus;
    }

    /**
     * @return the lastUpdatedUser
     */
    public String getLastUpdatedUser() {
        return lastUpdatedUser;
    }

    /**
     * @param lastUpdatedUser the lastUpdatedUser to set
     */
    public void setLastUpdatedUser(String lastUpdatedUser) {
        this.lastUpdatedUser = lastUpdatedUser;
    }

    /**
     * @return the lastUpdatedTime
     */
    public Timestamp getLastUpdatedTime() {
        return lastUpdatedTime;
    }

    /**
     * @param lastUpdatedTime the lastUpdatedTime to set
     */
    public void setLastUpdatedTime(Timestamp lastUpdatedTime) {
        this.lastUpdatedTime = lastUpdatedTime;
    }

    /**
     * @return the createUserId
     */
    public String getCreateUserId() {
        return createUserId;
    }

    /**
     * @param createUserId the createUserId to set
     */
    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * @return the createTime
     */
    public Timestamp getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Boolean getOldSpecFlag() {
        return oldSpecFlag;
    }

    public void setOldSpecFlag(Boolean oldSpecFlag) {
        this.oldSpecFlag = oldSpecFlag;
    }

    @java.lang.Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((activeFlag == null) ? 0 : activeFlag.hashCode());
        result = prime * result + ((activeTime == null) ? 0 : activeTime.hashCode());
        result = prime * result + ((activeUser == null) ? 0 : activeUser.hashCode());
        result = prime * result + ((createTime == null) ? 0 : createTime.hashCode());
        result = prime * result + ((createUserId == null) ? 0 : createUserId.hashCode());
        result = prime * result + ((currentStatus == null) ? 0 : currentStatus.hashCode());
        result = prime * result + ((lastUpdatedTime == null) ? 0 : lastUpdatedTime.hashCode());
        result = prime * result + ((lastUpdatedUser == null) ? 0 : lastUpdatedUser.hashCode());
        result = prime * result + ((processId == null) ? 0 : processId.hashCode());
        result = prime * result + ((processRrn == null) ? 0 : processRrn.hashCode());
        result = prime * result + ((processVersion == null) ? 0 : processVersion.hashCode());
        result = prime * result + ((productId == null) ? 0 : productId.hashCode());
        result = prime * result + ((productRrn == null) ? 0 : productRrn.hashCode());
        result = prime * result + ((productVersion == null) ? 0 : productVersion.hashCode());
        return result;
    }

    @java.lang.Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        ProductSpecInfo other = (ProductSpecInfo) obj;
        if (processRrn == null) {
            if (other.processRrn != null) {
                return false;
            }
        } else if (!processRrn.equals(other.processRrn)) {
            return false;
        }
        if (processVersion == null) {
            if (other.processVersion != null) {
                return false;
            }
        } else if (!processVersion.equals(other.processVersion)) {
            return false;
        }
        if (productRrn == null) {
            if (other.productRrn != null) {
                return false;
            }
        } else if (!productRrn.equals(other.productRrn)) {
            return false;
        }
        if (productVersion == null) {
            if (other.productVersion != null) {
                return false;
            }
        } else if (!productVersion.equals(other.productVersion)) {
            return false;
        }
        return true;
    }

    @java.lang.Override
    public String toString() {
        return "ProductSpecItemInfo [productRrn=" + productRrn + ", productId=" + productId + ", productVersion=" +
                productVersion + ", processRrn=" + processRrn + ", processId=" + processId + ", processVersion=" +
                processVersion + ", activeFlag=" + activeFlag + ", activeTime=" + activeTime + ", activeUser=" +
                activeUser + ", currentStatus=" + currentStatus + ", lastUpdatedUser=" + lastUpdatedUser +
                ", lastUpdatedTime=" + lastUpdatedTime + ", createUserId=" + createUserId + ", createTime=" +
                createTime + "]";
    }

    @java.lang.Override
    public int compareTo(ProductSpecInfo o) {
        if (this.processVersion == o.processVersion) {
            return o.productVersion - this.productVersion;
        } else {
            return o.processVersion - this.processVersion;
        }
    }

}