package com.changhong.epc.bean.tenant.master; import com.changhong.epc.bean.count.MasterInfo; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import java.util.Collections; import java.util.List; import java.util.Objects; @Data @EqualsAndHashCode(of = {"defineCode", "mvCode"}) @NoArgsConstructor public class MasterEleValue implements Comparable{ /** * */ private static final long serialVersionUID = 1L; /** * 主数据 */ private String defineCode; /** * in元素标识符 */ private String inMeCode; /** * out元素标识符 */ private String outMeCode; /** * out元素条件值 */ private String mvCode; /** * 别名,用于确定code,value */ private String alias; /** * 用于参数传递 */ private String tableName; /** * 关联主数据值 */ private List joinDefines = Collections.EMPTY_LIST; public MasterEleValue(String defineCode, String mvCode){ this.defineCode = defineCode; this.mvCode = mvCode; } @Override public int compareTo(MasterEleValue o) { return Objects.toString(this.defineCode, "") .compareTo(Objects.toString(o.getDefineCode(), "")) + Objects.toString(this.mvCode, "") .compareTo(Objects.toString(o.getMvCode(), "")); } public MasterInfo toMasterInfo(){ return new MasterInfo(this.defineCode, this.inMeCode, this.mvCode); } }