package com.bocloud.ims.entity.resource;

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.List;
import java.util.Objects;

/**
 * storage_view_group实体类
 *
 */
@Table("storage_view_group")
public class StorageViewGroup extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("vendor_id")
	private Long vendorId;
	@Column("uuid")
	private String uuid;
	@Column("lun_group_uuid")
	private String lunGroupUuid;
	@Column("access_path_id")
	private Long accessPathId; // 访问路径id
	@Column("volume_id")
	private Long volumeId;
	@Column("storage_host_id")
	private Long storageHostId;
	@IgnoreAll
	private List<Volume> volumes;
	@IgnoreAll
	private List<Long> volumeIds;
	@IgnoreAll
	private StorageHost storageHost;
	@Column("volume_name")
	@IgnoreAll
	private String volumeName;
	@Column("host_name")
	@IgnoreAll
	private String hostName;
	@IgnoreAll
	private List<String> volumeNames;

	public Long getId() {
		return id;
	}

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

	public Long getVendorId() {
		return vendorId;
	}

	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	public String getUuid() {
		return uuid;
	}

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

	public Long getAccessPathId() {
		return accessPathId;
	}

	public void setAccessPathId(Long accessPathId) {
		this.accessPathId = accessPathId;
	}

	public Long getVolumeId() {
		return volumeId;
	}

	public void setVolumeId(Long volumeId) {
		this.volumeId = volumeId;
	}

	public Long getStorageHostId() {
		return storageHostId;
	}

	public void setStorageHostId(Long storageHostId) {
		this.storageHostId = storageHostId;
	}

	public List<Volume> getVolumes() {
		return volumes;
	}

	public void setVolumes(List<Volume> volumes) {
		this.volumes = volumes;
	}

	public StorageHost getStorageHost() {
		return storageHost;
	}

	public void setStorageHost(StorageHost storageHost) {
		this.storageHost = storageHost;
	}

	public List<Long> getVolumeIds() {
		return volumeIds;
	}

	public void setVolumeIds(List<Long> volumeIds) {
		this.volumeIds = volumeIds;
	}

	public String getVolumeName() {
		return volumeName;
	}

	public void setVolumeName(String volumeName) {
		this.volumeName = volumeName;
	}

	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public List<String> getVolumeNames() {
		return volumeNames;
	}

	public void setVolumeNames(List<String> volumeNames) {
		this.volumeNames = volumeNames;
	}

	public String getLunGroupUuid() {
		return lunGroupUuid;
	}

	public void setLunGroupUuid(String lunGroupUuid) {
		this.lunGroupUuid = lunGroupUuid;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}
		StorageViewGroup that = (StorageViewGroup) o;
		return Objects.equals(this.volumeId, that.volumeId);
	}

	@Override
	public int hashCode() {
		return Objects.hash(volumeId);
	}

}
