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.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * Category generated by hbm2java */ @Entity @Table(name = "CATEGORY", schema = "PUBLIC", catalog = "SAKILA") public class Category implements java.io.Serializable { private byte categoryId; private String name; private Date lastUpdate; private Set<FilmCategory> filmCategories = new HashSet<FilmCategory>(0); private Set<FilmCategory> filmCategories_1 = new HashSet<FilmCategory>(0); public Category() { } public Category(byte categoryId, String name, Date lastUpdate) { this.categoryId = categoryId; this.name = name; this.lastUpdate = lastUpdate; } public Category(byte categoryId, String name, Date lastUpdate, Set<FilmCategory> filmCategories, Set<FilmCategory> filmCategories_1) { this.categoryId = categoryId; this.name = name; this.lastUpdate = lastUpdate; this.filmCategories = filmCategories; this.filmCategories_1 = filmCategories_1; } @Id @Column(name = "CATEGORY_ID", unique = true, nullable = false) public byte getCategoryId() { return this.categoryId; } public void setCategoryId(byte categoryId) { this.categoryId = categoryId; } @Column(name = "NAME", nullable = false, length = 25) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @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 = "category") public Set<FilmCategory> getFilmCategories() { return this.filmCategories; } public void setFilmCategories(Set<FilmCategory> filmCategories) { this.filmCategories = filmCategories; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "category") public Set<FilmCategory> getFilmCategories_1() { return this.filmCategories_1; } public void setFilmCategories_1(Set<FilmCategory> filmCategories_1) { this.filmCategories_1 = filmCategories_1; } }