package org.zstack.header.console;
import org.zstack.header.vm.VmInstanceEO;
import org.zstack.header.vo.ForeignKey;
import org.zstack.header.vo.ForeignKey.ReferenceOption;
import org.zstack.header.vo.ResourceVO;
import javax.persistence.*;
import java.sql.Timestamp;
/**
* Created with IntelliJ IDEA.
* User: frank
* Time: 11:09 PM
* To change this template use File | Settings | File Templates.
*/
@Entity
@Table
public class ConsoleProxyVO extends ResourceVO {
@Column
@ForeignKey(parentEntityClass = VmInstanceEO.class, onDeleteAction = ReferenceOption.CASCADE)
private String vmInstanceUuid;
@Column
private String agentIp;
@Column
private String proxyHostname;
@Column
private Integer proxyPort;
@Column
private String targetHostname;
@Column
private int targetPort;
@Column
@Enumerated(value = EnumType.STRING)
private ConsoleProxyStatus status;
@Column
private String scheme;
@Column
private String proxyIdentity;
@Column
private String agentType;
@Column
private String token;
@Column
private Timestamp createDate;
@Column
private Timestamp lastOpDate;
@PreUpdate
private void preUpdate() {
lastOpDate = null;
}
public String getVmInstanceUuid() {
return vmInstanceUuid;
}
public void setVmInstanceUuid(String vmInstanceUuid) {
this.vmInstanceUuid = vmInstanceUuid;
}
public String getProxyIdentity() {
return proxyIdentity;
}
public void setProxyIdentity(String proxyIdentity) {
this.proxyIdentity = proxyIdentity;
}
public Timestamp getCreateDate() {
return createDate;
}
public void setCreateDate(Timestamp createDate) {
this.createDate = createDate;
}
public Timestamp getLastOpDate() {
return lastOpDate;
}
public void setLastOpDate(Timestamp lastOpDate) {
this.lastOpDate = lastOpDate;
}
public String getAgentIp() {
return agentIp;
}
public void setAgentIp(String agentIp) {
this.agentIp = agentIp;
}
public String getAgentType() {
return agentType;
}
public void setAgentType(String agentType) {
this.agentType = agentType;
}
public String getProxyHostname() {
return proxyHostname;
}
public void setProxyHostname(String proxyHostname) {
this.proxyHostname = proxyHostname;
}
public Integer getProxyPort() {
return proxyPort;
}
public void setProxyPort(Integer proxyPort) {
this.proxyPort = proxyPort;
}
public String getTargetHostname() {
return targetHostname;
}
public void setTargetHostname(String targetHostname) {
this.targetHostname = targetHostname;
}
public int getTargetPort() {
return targetPort;
}
public void setTargetPort(int targetPort) {
this.targetPort = targetPort;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getScheme() {
return scheme;
}
public void setScheme(String scheme) {
this.scheme = scheme;
}
public ConsoleProxyStatus getStatus() {
return status;
}
public void setStatus(ConsoleProxyStatus status) {
this.status = status;
}
}