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

com.kuangkie.carbon.common.BaseContext Maven / Gradle / Ivy

The newest version!
package com.kuangkie.carbon.common;

import java.util.HashMap;
import java.util.Map;

import com.kuangkie.carbon.fg.FunctionGroup;
import com.kuangkie.carbon.record.ProRecord;


public class BaseContext  {
	
	public BaseContext() {
		
	}
	private Map funcActionParamMap=new HashMap<>();
	
	public void putFuncActionParam(String funcActionKey, ProRecord param) {
		funcActionParamMap.put(funcActionKey, param);
	}

	public Map getFuncActionParamMap() {
		return funcActionParamMap;
	}


	public ProRecord getFuncActionParam(String key) {
		return funcActionParamMap.get(key);
	}

	public BaseContext(Map functionGroupMap,boolean backup) {
		super();
		this.functionGroupMap = functionGroupMap;
		this.backup=backup;
	}

	private Map functionGroupMap;
	
	private boolean backup=false;
	
	private String userCode;
	
	

	public Map getFunctionGroupMap() {
		return functionGroupMap;
	}

	public void setFunctionGroupMap(Map functionGroupMap) {
		this.functionGroupMap = functionGroupMap;
	}
	
	public void putFunctionGroup(String itemCode, FunctionGroup functionGroup) {
		if(this.functionGroupMap==null) {
			this.functionGroupMap=new HashMap<>();
		}
		this.functionGroupMap .put(itemCode, functionGroup);
	}
	
	public void removeFunctionGroup(String itemCode) {
		if(this.functionGroupMap==null) {
			this.functionGroupMap=new HashMap<>();
		}
		this.functionGroupMap.remove(itemCode);
	}

	public boolean isBackup() {
		return backup;
	}

	public void setBackup(boolean backup) {
		this.backup = backup;
	}


	public String getUserCode() {
		return userCode;
	}


	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy