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

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

	private int customernumber;
	private Employees employees;
	private String customername;
	private String contactlastname;
	private String contactfirstname;
	private String phone;
	private String addressline1;
	private String addressline2;
	private String city;
	private String state;
	private String postalcode;
	private String country;
	private Double creditlimit;
	private Set<Payments> paymentses = new HashSet<Payments>(0);
	private Set<Orders> orderses = new HashSet<Orders>(0);

	public Customers() {
	}

	public Customers(int customernumber, String customername,
			String contactlastname, String contactfirstname, String phone,
			String addressline1, String city, String country) {
		this.customernumber = customernumber;
		this.customername = customername;
		this.contactlastname = contactlastname;
		this.contactfirstname = contactfirstname;
		this.phone = phone;
		this.addressline1 = addressline1;
		this.city = city;
		this.country = country;
	}

	public Customers(int customernumber, Employees employees,
			String customername, String contactlastname,
			String contactfirstname, String phone, String addressline1,
			String addressline2, String city, String state, String postalcode,
			String country, Double creditlimit, Set<Payments> paymentses,
			Set<Orders> orderses) {
		this.customernumber = customernumber;
		this.employees = employees;
		this.customername = customername;
		this.contactlastname = contactlastname;
		this.contactfirstname = contactfirstname;
		this.phone = phone;
		this.addressline1 = addressline1;
		this.addressline2 = addressline2;
		this.city = city;
		this.state = state;
		this.postalcode = postalcode;
		this.country = country;
		this.creditlimit = creditlimit;
		this.paymentses = paymentses;
		this.orderses = orderses;
	}

	@Id
	@Column(name = "CUSTOMERNUMBER", unique = true, nullable = false)
	public int getCustomernumber() {
		return this.customernumber;
	}

	public void setCustomernumber(int customernumber) {
		this.customernumber = customernumber;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SALESREPEMPLOYEENUMBER")
	public Employees getEmployees() {
		return this.employees;
	}

	public void setEmployees(Employees employees) {
		this.employees = employees;
	}

	@Column(name = "CUSTOMERNAME", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getCustomername() {
		return this.customername;
	}

	public void setCustomername(String customername) {
		this.customername = customername;
	}

	@Column(name = "CONTACTLASTNAME", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getContactlastname() {
		return this.contactlastname;
	}

	public void setContactlastname(String contactlastname) {
		this.contactlastname = contactlastname;
	}

	@Column(name = "CONTACTFIRSTNAME", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getContactfirstname() {
		return this.contactfirstname;
	}

	public void setContactfirstname(String contactfirstname) {
		this.contactfirstname = contactfirstname;
	}

	@Column(name = "PHONE", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "ADDRESSLINE1", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getAddressline1() {
		return this.addressline1;
	}

	public void setAddressline1(String addressline1) {
		this.addressline1 = addressline1;
	}

	@Column(name = "ADDRESSLINE2", length = 50)
	@Length(max = 50)
	public String getAddressline2() {
		return this.addressline2;
	}

	public void setAddressline2(String addressline2) {
		this.addressline2 = addressline2;
	}

	@Column(name = "CITY", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "STATE", length = 50)
	@Length(max = 50)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "POSTALCODE", length = 15)
	@Length(max = 15)
	public String getPostalcode() {
		return this.postalcode;
	}

	public void setPostalcode(String postalcode) {
		this.postalcode = postalcode;
	}

	@Column(name = "COUNTRY", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@Column(name = "CREDITLIMIT", precision = 0, scale = 0)
	public Double getCreditlimit() {
		return this.creditlimit;
	}

	public void setCreditlimit(Double creditlimit) {
		this.creditlimit = creditlimit;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "customers")
	public Set<Payments> getPaymentses() {
		return this.paymentses;
	}

	public void setPaymentses(Set<Payments> paymentses) {
		this.paymentses = paymentses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "customers")
	public Set<Orders> getOrderses() {
		return this.orderses;
	}

	public void setOrderses(Set<Orders> orderses) {
		this.orderses = orderses;
	}

}
