package org.domain.zzzzzz2.entity;

// Generated 01.03.2010 19:13:35 by Hibernate Tools 3.2.6.CR1

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.OneToMany;
import javax.persistence.Table;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * Employees generated by hbm2java
 */
@Entity
@Table(name = "EMPLOYEES", schema = "PUBLIC")
public class Employees implements java.io.Serializable {

	private int employeenumber;
	private String lastname;
	private String firstname;
	private String extension;
	private String email;
	private String officecode;
	private Integer reportsto;
	private String jobtitle;
	private Set<Customers> customerses = new HashSet<Customers>(0);

	public Employees() {
	}

	public Employees(int employeenumber, String lastname, String firstname,
			String extension, String email, String officecode, String jobtitle) {
		this.employeenumber = employeenumber;
		this.lastname = lastname;
		this.firstname = firstname;
		this.extension = extension;
		this.email = email;
		this.officecode = officecode;
		this.jobtitle = jobtitle;
	}

	public Employees(int employeenumber, String lastname, String firstname,
			String extension, String email, String officecode,
			Integer reportsto, String jobtitle, Set<Customers> customerses) {
		this.employeenumber = employeenumber;
		this.lastname = lastname;
		this.firstname = firstname;
		this.extension = extension;
		this.email = email;
		this.officecode = officecode;
		this.reportsto = reportsto;
		this.jobtitle = jobtitle;
		this.customerses = customerses;
	}

	@Id
	@Column(name = "EMPLOYEENUMBER", unique = true, nullable = false)
	public int getEmployeenumber() {
		return this.employeenumber;
	}

	public void setEmployeenumber(int employeenumber) {
		this.employeenumber = employeenumber;
	}

	@Column(name = "LASTNAME", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getLastname() {
		return this.lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	@Column(name = "FIRSTNAME", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getFirstname() {
		return this.firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	@Column(name = "EXTENSION", nullable = false, length = 10)
	@NotNull
	@Length(max = 10)
	public String getExtension() {
		return this.extension;
	}

	public void setExtension(String extension) {
		this.extension = extension;
	}

	@Column(name = "EMAIL", nullable = false, length = 100)
	@NotNull
	@Length(max = 100)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "OFFICECODE", nullable = false, length = 10)
	@NotNull
	@Length(max = 10)
	public String getOfficecode() {
		return this.officecode;
	}

	public void setOfficecode(String officecode) {
		this.officecode = officecode;
	}

	@Column(name = "REPORTSTO")
	public Integer getReportsto() {
		return this.reportsto;
	}

	public void setReportsto(Integer reportsto) {
		this.reportsto = reportsto;
	}

	@Column(name = "JOBTITLE", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getJobtitle() {
		return this.jobtitle;
	}

	public void setJobtitle(String jobtitle) {
		this.jobtitle = jobtitle;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "employees")
	public Set<Customers> getCustomerses() {
		return this.customerses;
	}

	public void setCustomerses(Set<Customers> customerses) {
		this.customerses = customerses;
	}

}
