package com.bocloud.ims.entity.resource.hmc;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;

import java.util.Map;
import java.util.Set;

/**
 * HMC虚拟交换机
 * 
 * @author ShaolongTan
 *
 */
@Deprecated
@Table("hmc_virtual_switch")
public class HmcVirtualSwitch extends GenericEntity {
    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("uuid")
    private String uuid;
    @Column("server_id")
    private Long serverId;
    @Column("switch_id")
    private Integer switchId;

    @IgnoreAll
    private String createUserName;

    @IgnoreAll
    private Map<String, Set<Integer>> partition;

    @IgnoreAll
    private Set<Integer> vlans;

    @IgnoreAll
    private String serverName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Long getServerId() {
        return serverId;
    }

    public void setServerId(Long serverId) {
        this.serverId = serverId;
    }

    public Integer getSwitchId() {
        return switchId;
    }

    public void setSwitchId(Integer switchId) {
        this.switchId = switchId;
    }

    public Map<String, Set<Integer>> getPartition() {
        return partition;
    }

    public void setPartition(Map<String, Set<Integer>> partition) {
        this.partition = partition;
    }

    public Set<Integer> getVlans() {
        return vlans;
    }

    public void setVlans(Set<Integer> vlans) {
        this.vlans = vlans;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public void preSave(Long creatorId, Long menderId, Long serverId) {
        this.setCreatorId(creatorId);
        this.setMenderId(menderId);
        this.setServerId(serverId);
    }
}
