package com.skycloud.jkb.pojo.entity;
// default package
// Generated 2013-12-31 14:44:24 by Hibernate Tools 3.4.0.CR1

import com.skycloud.jkb.pojo.entity.Hosts;
import com.skycloud.jkb.pojo.entity.Items;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Interfaces generated by hbm2java
 */
@Entity
@Table(name = "interface", catalog = "skycloud")
public class Interfaces implements java.io.Serializable {

	private long interfaceid;
	private Hosts hosts;
	private int main;
	private int type;
	private int useip;
	private String ip;
	private String dns;
	private String port;
	private Set<Items> itemses = new HashSet<Items>(0);

	public Interfaces() {
	}

	public Interfaces(long interfaceid, Hosts hosts, int main, int type, int useip, String ip, String dns, String port) {
		this.interfaceid = interfaceid;
		this.hosts = hosts;
		this.main = main;
		this.type = type;
		this.useip = useip;
		this.ip = ip;
		this.dns = dns;
		this.port = port;
	}

	public Interfaces(long interfaceid, Hosts hosts, int main, int type, int useip, String ip, String dns, String port,
			Set<Items> itemses) {
		this.interfaceid = interfaceid;
		this.hosts = hosts;
		this.main = main;
		this.type = type;
		this.useip = useip;
		this.ip = ip;
		this.dns = dns;
		this.port = port;
		this.itemses = itemses;
	}

	@Id
	@Column(name = "interfaceid", unique = true, nullable = false)
	public long getInterfaceid() {
		return this.interfaceid;
	}

	public void setInterfaceid(long interfaceid) {
		this.interfaceid = interfaceid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "hostid", nullable = false)
	public Hosts getHosts() {
		return this.hosts;
	}

	public void setHosts(Hosts hosts) {
		this.hosts = hosts;
	}

	@Column(name = "main", nullable = false)
	public int getMain() {
		return this.main;
	}

	public void setMain(int main) {
		this.main = main;
	}

	@Column(name = "type", nullable = false)
	public int getType() {
		return this.type;
	}

	public void setType(int type) {
		this.type = type;
	}

	@Column(name = "useip", nullable = false)
	public int getUseip() {
		return this.useip;
	}

	public void setUseip(int useip) {
		this.useip = useip;
	}

	@Column(name = "ip", nullable = false, length = 39)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "dns", nullable = false, length = 64)
	public String getDns() {
		return this.dns;
	}

	public void setDns(String dns) {
		this.dns = dns;
	}

	@Column(name = "port", nullable = false, length = 64)
	public String getPort() {
		return this.port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "interfaces")
	public Set<Items> getItemses() {
		return this.itemses;
	}

	public void setItemses(Set<Items> itemses) {
		this.itemses = itemses;
	}

}
