package org.gen;
// Generated Mar 5, 2015 8:03:38 AM by Hibernate Tools 4.3.1
import java.util.Date;
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 javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
* Store generated by hbm2java
*/
@Entity
@Table(name = "STORE", schema = "PUBLIC", catalog = "SAKILA")
public class Store implements java.io.Serializable {
private byte storeId;
private Address address;
private Staff staff;
private Date lastUpdate;
private Set<Customer> customers = new HashSet<Customer>(0);
private Set<Staff> staffs = new HashSet<Staff>(0);
private Set<Inventory> inventories = new HashSet<Inventory>(0);
private Set<Customer> customers_1 = new HashSet<Customer>(0);
private Set<Inventory> inventories_1 = new HashSet<Inventory>(0);
private Set<Staff> staffs_1 = new HashSet<Staff>(0);
public Store() {
}
public Store(byte storeId, Address address, Staff staff, Date lastUpdate) {
this.storeId = storeId;
this.address = address;
this.staff = staff;
this.lastUpdate = lastUpdate;
}
public Store(byte storeId, Address address, Staff staff, Date lastUpdate,
Set<Customer> customers, Set<Staff> staffs,
Set<Inventory> inventories, Set<Customer> customers_1,
Set<Inventory> inventories_1, Set<Staff> staffs_1) {
this.storeId = storeId;
this.address = address;
this.staff = staff;
this.lastUpdate = lastUpdate;
this.customers = customers;
this.staffs = staffs;
this.inventories = inventories;
this.customers_1 = customers_1;
this.inventories_1 = inventories_1;
this.staffs_1 = staffs_1;
}
@Id
@Column(name = "STORE_ID", unique = true, nullable = false)
public byte getStoreId() {
return this.storeId;
}
public void setStoreId(byte storeId) {
this.storeId = storeId;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ADDRESS_ID", nullable = false)
public Address getAddress() {
return this.address;
}
public void setAddress(Address address) {
this.address = address;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "MANAGER_STAFF_ID", nullable = false)
public Staff getStaff() {
return this.staff;
}
public void setStaff(Staff staff) {
this.staff = staff;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "LAST_UPDATE", nullable = false, length = 23)
public Date getLastUpdate() {
return this.lastUpdate;
}
public void setLastUpdate(Date lastUpdate) {
this.lastUpdate = lastUpdate;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "store")
public Set<Customer> getCustomers() {
return this.customers;
}
public void setCustomers(Set<Customer> customers) {
this.customers = customers;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "store")
public Set<Staff> getStaffs() {
return this.staffs;
}
public void setStaffs(Set<Staff> staffs) {
this.staffs = staffs;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "store")
public Set<Inventory> getInventories() {
return this.inventories;
}
public void setInventories(Set<Inventory> inventories) {
this.inventories = inventories;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "store")
public Set<Customer> getCustomers_1() {
return this.customers_1;
}
public void setCustomers_1(Set<Customer> customers_1) {
this.customers_1 = customers_1;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "store")
public Set<Inventory> getInventories_1() {
return this.inventories_1;
}
public void setInventories_1(Set<Inventory> inventories_1) {
this.inventories_1 = inventories_1;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "store")
public Set<Staff> getStaffs_1() {
return this.staffs_1;
}
public void setStaffs_1(Set<Staff> staffs_1) {
this.staffs_1 = staffs_1;
}
}