package com.eactive.eai.rms.bat.web.eims.vo;

import java.util.HashMap;

import com.eactive.eai.rms.bat.web.eims.EIMSBatConstants;
import com.eactive.eai.rms.common.datasource.DataSourceContextHolder;
import com.eactive.eai.rms.onl.vo.PersistentVo;

/**
 * 인터페이스 등록,수정
 * TSEAIES04
 * @author jjh
 *
 */
public class BatInterfaceVo implements PersistentVo{

	private String intfid            ;
	private String intfname          ;
	private String intfdesc          ;
	private String workgrpcd         ;
	private String sndadptrcd        ;
	private String sndadptrcdseq     ;
	private String batchtype         ;
	private String regdate           ;
	private String reguserid         ;
	private String moddate           ;
	private String moduserid         ;
	private String intfstartdate     ;
	private String intfenddate       ;
	private String delyn   = "1"          ; //DELYN 사용여부(1:0)
	private String eventcallval      ; //EVENTCALLVAL 이벤트호출여부(1:0)
	private String restartyn         ;
	private String level4     = "0"  ; //LEVEL4 송신업데이트여부(1:0)
	private String postjobhostname   ;
	private String postjobportnoname ;
	private String postjobuid        ;
	private String postjobuserpwdname;
	private String postjobcmd        ;
	private String sizeonce          ;
	private String procterm          ;
	private String reqchgr           ;
	private String reqchgrtlno       ;
	private String reschgr           ;
	private String reschgrtlno       ;
	
	
	
	public String getIntfid() {
		return intfid;
	}
	public void setIntfid(String intfid) {
		this.intfid = intfid;
	}
	public String getIntfname() {
		return intfname;
	}
	public void setIntfname(String intfname) {
		this.intfname = intfname;
	}
	public String getIntfdesc() {
		return intfdesc;
	}
	public void setIntfdesc(String intfdesc) {
		this.intfdesc = intfdesc;
	}
	public String getWorkgrpcd() {
		return workgrpcd;
	}
	public void setWorkgrpcd(String workgrpcd) {
		this.workgrpcd = workgrpcd;
	}
	public String getSndadptrcd() {
		return sndadptrcd;
	}
	public void setSndadptrcd(String sndadptrcd) {
		this.sndadptrcd = sndadptrcd;
	}
	public String getSndadptrcdseq() {
		return sndadptrcdseq;
	}
	public void setSndadptrcdseq(String sndadptrcdseq) {
		this.sndadptrcdseq = sndadptrcdseq;
	}
	public String getBatchtype() {
		return batchtype;
	}
	public void setBatchtype(String batchtype) {
		this.batchtype = batchtype;
	}
	public String getRegdate() {
		return regdate;
	}
	public void setRegdate(String regdate) {
		this.regdate = regdate;
	}
	public String getReguserid() {
		return reguserid;
	}
	public void setReguserid(String reguserid) {
		this.reguserid = reguserid;
	}
	public String getModdate() {
		return moddate;
	}
	public void setModdate(String moddate) {
		this.moddate = moddate;
	}
	public String getModuserid() {
		return moduserid;
	}
	public void setModuserid(String moduserid) {
		this.moduserid = moduserid;
	}
	public String getIntfstartdate() {
		return intfstartdate;
	}
	public void setIntfstartdate(String intfstartdate) {
		this.intfstartdate = intfstartdate;
	}
	public String getIntfenddate() {
		return intfenddate;
	}
	public void setIntfenddate(String intfenddate) {
		this.intfenddate = intfenddate;
	}
	public String getDelyn() {
		return delyn;
	}
	public void setDelyn(String delyn) {
		this.delyn = delyn;
	}
	public String getEventcallval() {
		return eventcallval;
	}
	public void setEventcallval(String eventcallval) {
		this.eventcallval = eventcallval;
	}
	public String getRestartyn() {
		return restartyn;
	}
	public void setRestartyn(String restartyn) {
		this.restartyn = restartyn;
	}
	public String getLevel4() {
		return level4;
	}
	public void setLevel4(String level4) {
		this.level4 = level4;
	}
	public String getPostjobhostname() {
		return postjobhostname;
	}
	public void setPostjobhostname(String postjobhostname) {
		this.postjobhostname = postjobhostname;
	}
	public String getPostjobportnoname() {
		return postjobportnoname;
	}
	public void setPostjobportnoname(String postjobportnoname) {
		this.postjobportnoname = postjobportnoname;
	}
	public String getPostjobuid() {
		return postjobuid;
	}
	public void setPostjobuid(String postjobuid) {
		this.postjobuid = postjobuid;
	}
	public String getPostjobuserpwdname() {
		return postjobuserpwdname;
	}
	public void setPostjobuserpwdname(String postjobuserpwdname) {
		this.postjobuserpwdname = postjobuserpwdname;
	}
	public String getPostjobcmd() {
		return postjobcmd;
	}
	public void setPostjobcmd(String postjobcmd) {
		this.postjobcmd = postjobcmd;
	}
	public String getSizeonce() {
		return sizeonce;
	}
	public void setSizeonce(String sizeonce) {
		this.sizeonce = sizeonce;
	}
	public String getProcterm() {
		return procterm;
	}
	public void setProcterm(String procterm) {
		this.procterm = procterm;
	}
	public String getReqchgr() {
		return reqchgr;
	}
	public void setReqchgr(String reqchgr) {
		this.reqchgr = reqchgr;
	}
	public String getReqchgrtlno() {
		return reqchgrtlno;
	}
	public void setReqchgrtlno(String reqchgrtlno) {
		this.reqchgrtlno = reqchgrtlno;
	}
	public String getReschgr() {
		return reschgr;
	}
	public void setReschgr(String reschgr) {
		this.reschgr = reschgr;
	}
	public String getReschgrtlno() {
		return reschgrtlno;
	}
	public void setReschgrtlno(String reschgrtlno) {
		this.reschgrtlno = reschgrtlno;
	}
	
	@Override
	public String getSchemaId() {
		return DataSourceContextHolder.getDataSourceType().getSchema();
	}
	

	public void setAllInf(HashMap<String,String> infMap) {
		
		this.setIntfid(infMap.get(EIMSBatConstants.INTFID));
		this.setIntfname(infMap.get(EIMSBatConstants.INTFNAME));
		this.setIntfdesc(infMap.get(EIMSBatConstants.INTFDESC));
		this.setWorkgrpcd(infMap.get(EIMSBatConstants.WORKGRPCD));
		
//		this.setSndadptrcd(infMap.get(EIMSBatConstants.SNDADPTRCD));
//		this.setSndadptrcdseq(infMap.get(EIMSBatConstants.SNDADPTRCDSEQ));
		String AdapterType = infMap.get(EIMSBatConstants.BATCHTYPE).equals("FF") ? "FN" : infMap.get(EIMSBatConstants.BATCHTYPE).equals("DD") ? "DB" : "__"; 
		this.setSndadptrcd(infMap.get(EIMSBatConstants.SRCBZSYSTEMCD)+AdapterType+"IN01");
		this.setSndadptrcdseq("1");
		
		this.setBatchtype(infMap.get(EIMSBatConstants.BATCHTYPE));
		this.setReguserid(infMap.get(EIMSBatConstants.AUTHORID));
		this.setModuserid(infMap.get(EIMSBatConstants.AUTHORID));
		this.setIntfstartdate(infMap.get(EIMSBatConstants.INTFSTARTDATE));	
		this.setEventcallval(infMap.get(EIMSBatConstants.EVENTCALLVAL));
			
		if( infMap.get(EIMSBatConstants.DELYN) != null ) {		
			this.setDelyn(infMap.get(EIMSBatConstants.DELYN));
		}
		
	}
	
}
