package com.sdtool.common.entity.base;

import com.sdtool.common.entity.site.ERPTokenUser;
import com.sweetfish.source.PageFlipper;
import org.rex.RMap;

import java.util.Date;

/**
 * Created by jlutt on 2020-08-11
 * 脚本处理对象，查询参数
 * @author jlutt
 */
@SuppressWarnings({"rawtypes", "unused"})
public class ProcessSearchItem extends BaseEntity {

    private RMap searchData;

    private int exportFlag;

    private ERPTokenUser currentUser;

    private PageFlipper pageFlipper;

    private String dataSourceId;

    private long supplierCode;

    private String orderBy;

    public ProcessSearchItem() {
    }

    private ProcessSearchItem(Builder builder) {
        setCreateBy(builder.createBy);
        setCreateTime(builder.createTime);
        setCreateTimeLong(builder.createTimeLong);
        setUpdateBy(builder.updateBy);
        setUpdateTime(builder.updateTime);
        setUpdateTimeLong(builder.updateTimeLong);
        setSearchData(builder.searchData);
        setExportFlag(builder.exportFlag);
        setCurrentUser(builder.currentUser);
        setPageFlipper(builder.pageFlipper);
        setDataSourceId(builder.dataSourceId);
        setSupplierCode(builder.supplierCode);
        setOrderBy(builder.orderBy);
    }

    public static Builder newBuilder() {
        return new Builder();
    }


    public RMap getSearchData() {
        return searchData;
    }

    public void setSearchData(RMap searchData) {
        this.searchData = searchData;
    }

    public int getExportFlag() {
        return exportFlag;
    }

    public void setExportFlag(int exportFlag) {
        this.exportFlag = exportFlag;
    }

    public ERPTokenUser getCurrentUser() {
        return currentUser;
    }

    public void setCurrentUser(ERPTokenUser currentUser) {
        this.currentUser = currentUser;
    }

    public PageFlipper getPageFlipper() {
        return pageFlipper;
    }

    public void setPageFlipper(PageFlipper pageFlipper) {
        this.pageFlipper = pageFlipper;
    }

    public String getDataSourceId() {
        return dataSourceId;
    }

    public void setDataSourceId(String dataSourceId) {
        this.dataSourceId = dataSourceId;
    }

    public long getSupplierCode() {
        return supplierCode;
    }

    public void setSupplierCode(long supplierCode) {
        this.supplierCode = supplierCode;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public static final class Builder {
        private long createBy;
        private Date createTime;
        private long createTimeLong;
        private long updateBy;
        private Date updateTime;
        private long updateTimeLong;
        private RMap searchData;
        private int exportFlag;
        private ERPTokenUser currentUser;
        private PageFlipper pageFlipper;
        private String dataSourceId;
        private long supplierCode;

        private String orderBy;

        private Builder() {
        }

        public Builder createBy(long val) {
            createBy = val;
            return this;
        }

        public Builder createTime(Date val) {
            createTime = val;
            return this;
        }

        public Builder createTimeLong(long val) {
            createTimeLong = val;
            return this;
        }

        public Builder updateBy(long val) {
            updateBy = val;
            return this;
        }

        public Builder updateTime(Date val) {
            updateTime = val;
            return this;
        }

        public Builder updateTimeLong(long val) {
            updateTimeLong = val;
            return this;
        }

        public Builder searchData(RMap val) {
            searchData = val;
            return this;
        }

        public Builder exportFlag(int val) {
            exportFlag = val;
            return this;
        }

        public Builder currentUser(ERPTokenUser val) {
            currentUser = val;
            return this;
        }

        public Builder pageFlipper(PageFlipper val) {
            pageFlipper = val;
            return this;
        }

        public Builder dataSourceId(String val) {
            dataSourceId = val;
            return this;
        }

        public Builder supplierCode(long val) {
            supplierCode = val;
            return this;
        }

        public Builder orderBy(String val) {
            orderBy = val;
            return this;
        }

        public ProcessSearchItem build() {
            return new ProcessSearchItem(this);
        }
    }
}
