package com.eactive.eai.common.sessioninfo;

import java.io.Serializable;

public class SessionInfoVO implements Serializable {
	public enum Status {
		active, inactive
	};

	private String userId;
	private String sessionId;
	private String userName;
	private String rofcCode;
	private String brnName;
	private String brnCode;
	private Status sessionStatus;
	private String wsocInstance;
	private String wsocRemoteAddr;
	private Status wsocSessionStatus;
	private String terminalId;
	// YYYYMMDDHHMI24SS
	private String createTime;
	
	public SessionInfoVO() {
		
	}

	public SessionInfoVO(String userId) {
		this.userId = userId;
//		this.createTime = DatetimeUtil.getCurrentDateTime();
	}

	public String getUserId() {
		return userId;
	}

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

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getRofcCode() {
		return rofcCode;
	}

	public void setRofcCode(String rofcCode) {
		this.rofcCode = rofcCode;
	}

	public String getBrnName() {
		return brnName;
	}

	public void setBrnName(String brnName) {
		this.brnName = brnName;
	}

	public String getBrnCode() {
		return brnCode;
	}

	public void setBrnCode(String brnCode) {
		this.brnCode = brnCode;
	}

	public Status getSessionStatus() {
		return sessionStatus;
	}

	public String getSessionStatusInfo() {
		return sessionStatus == null ? "" : sessionStatus.toString();
	}
	public void setSessionStatusInfo(String status) {
		sessionStatus = Status.inactive.toString().equals(status) ? Status.inactive : Status.active;
	}
	
	public void setSessionStatus(Status sessionStatus) {
		this.sessionStatus = sessionStatus;
	}

	public String getWsocInstance() {
		return wsocInstance;
	}

	public void setWsocInstance(String wsocInstance) {
		this.wsocInstance = wsocInstance;
	}

	public String getWsocRemoteAddr() {
		return wsocRemoteAddr;
	}

	public void setWsocRemoteAddr(String wsocRemoteAddr) {
		this.wsocRemoteAddr = wsocRemoteAddr;
	}

	public Status getWsocSessionStatus() {
		return wsocSessionStatus;
	}

	public String getWsocSessionStatusInfo() {
		return wsocSessionStatus == null ? "" : wsocSessionStatus.toString();
	}

	public void setWsocSessionStatusInfo(String status) {
		wsocSessionStatus = Status.inactive.toString().equals(status) ? Status.inactive : Status.active;
	}

	public void setWsocSessionStatus(Status wsocSessionStatus) {
		this.wsocSessionStatus = wsocSessionStatus;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getTerminalId() {
		return terminalId;
	}

	public void setTerminalId(String terminalId) {
		this.terminalId = terminalId;
	}

	@Override
	public String toString() {
		return "SessionInfoVO [userId=" + userId + ", sessionId=" + sessionId + ", rofcCode=" + rofcCode + ", brnCode="
				+ brnCode + ", sessionStatus=" + sessionStatus + ", wsocInstance=" + wsocInstance + ", wsocRemoteAddr="
				+ wsocRemoteAddr + ", wsocSessionStatus=" + wsocSessionStatus + ", terminalId=" + terminalId
				+ ", createTime=" + createTime + "]";
	}
}
