All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kuangkie.carbon.fg.CopyParam Maven / Gradle / Ivy

package com.kuangkie.carbon.fg;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import com.kuangkie.carbon.util.MapUtil;

/**
 * 
 * @version: V1.0
 * 
 * @author: wangnq
 * 
 * @className: CopyParam
 * 
 * @packageName: com.kuangkie.carbon.fg
 * 
 * @description: 
 * 
 * @data: 2023年12月27日
 * 
 *
 */
public class CopyParam {

	private String code;
	
	private Map newValueMap;
	
	private boolean copyRelation=false;
	
	private boolean copyOpp2One=false;
	
	private Set excludedRelations;
	private HashMap> includedRelationMap;
	
	
	public CopyParam(String code) {
		super();
		this.code = code;
	}
	
	public CopyParam(String code, Map newValueMap, boolean copyRelation, boolean copyOpp2One) {
		super();
		this.code = code;
		this.newValueMap = newValueMap;
		this.copyRelation = copyRelation;
		this.copyOpp2One = copyOpp2One;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public Map getNewValueMap() {
		return newValueMap;
	}
	public void setNewValueMap(Map newValueMap) {
		this.newValueMap = newValueMap;
	}
	public boolean isCopyRelation() {
		return copyRelation;
	}
	public void setCopyRelation(boolean copyRelation) {
		this.copyRelation = copyRelation;
	}
	public boolean isCopyOpp2One() {
		return copyOpp2One;
	}
	public void setCopyOpp2One(boolean copyOpp2One) {
		this.copyOpp2One = copyOpp2One;
	}

	public Set getExcludedRelations() {
		return excludedRelations;
	}

	public void setExcludedRelations(Set excludedRelations) {
		this.excludedRelations = excludedRelations;
	}
	
	public void addExcludedRelation(Long excludedRelation) {
		if(excludedRelation==null) {
			return;
		}
		if(this.excludedRelations==null) {
			this.excludedRelations=new HashSet<>();
		}
		this.excludedRelations.add(excludedRelation);
	}

	
	
	public HashMap> getIncludedRelationMap() {
		return includedRelationMap;
	}

	public void setIncludedRelationMap(HashMap> includedRelationMap) {
		this.includedRelationMap = includedRelationMap;
	}

	public void putIncludedRelation(String itemCode,Long includedRelation) {
		if(itemCode==null || includedRelation==null) {
			return;
		}
		if(this.includedRelationMap==null) {
			this.includedRelationMap=new HashMap<>();
		}
		MapUtil.nullAddedHashSetGet(includedRelationMap, itemCode).add(includedRelation);
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy