package com.eactive.eai.rms.onl.loader.vo;

import java.io.Serializable;
import java.util.List;

import com.eactive.eai.rms.common.datasource.DataSourceTypeManager;
import com.eactive.eai.rms.onl.vo.PersistentVo;

@SuppressWarnings("serial")
public class RuleDeployJobVo implements Serializable, PersistentVo {
	private String jobId;
	private String serviceType;
	private String jobTitle;
	private String scheduledDateTime;
	private String lastJobTime;
	private String userId;
	private String userIp;
	private String status;
	private int failedCnt;
	private String failedMsg;
	List<RuleDeployJobItemVo> itemList;

	public String getJobId() {
		return jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	public String getServiceType() {
		return serviceType;
	}

	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}

	public String getJobTitle() {
		return jobTitle;
	}

	public void setJobTitle(String jobTitle) {
		this.jobTitle = jobTitle;
	}

	public String getScheduledDateTime() {
		return scheduledDateTime;
	}

	public void setScheduledDateTime(String scheduledDateTime) {
		this.scheduledDateTime = scheduledDateTime;
	}

	public String getLastJobTime() {
		return lastJobTime;
	}

	public void setLastJobTime(String lastJobTime) {
		this.lastJobTime = lastJobTime;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserIp() {
		return userIp;
	}

	public void setUserIp(String userIp) {
		this.userIp = userIp;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public int getFailedCnt() {
		return failedCnt;
	}

	public void setFailedCnt(int failedCnt) {
		this.failedCnt = failedCnt;
	}
	
	public String getFailedMsg() {
		return failedMsg;
	}

	public void setFailedMsg(String failedMsg) {
		this.failedMsg = failedMsg;
	}

	public List<RuleDeployJobItemVo> getItemList() {
		return itemList;
	}

	public void setItemList(List<RuleDeployJobItemVo> itemList) {
		this.itemList = itemList;
	}

	@Override
	public String toString() {
		return "RuleDeployJobVo [jobId=" + jobId + ", serviceType=" + serviceType + ", jobTitle=" + jobTitle
				+ ", scheduledDateTime=" + scheduledDateTime + ", lastJobTime=" + lastJobTime + ", userId=" + userId
				+ ", userIp=" + userIp + ", status=" + status + ", failedCnt=" + failedCnt + ", itemList=" + itemList
				+ "]";
	}

	// @Override
	public String getSchemaId() {
		// return DataSourceContextHolder.getDataSourceType().getSchema();
		return DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.MONITORING).getSchema();
	}
}
