package org.gen;
// Generated Mar 5, 2015 8:03:38 AM by Hibernate Tools 4.3.1
import java.math.BigDecimal;
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;
/**
* Film generated by hbm2java
*/
@Entity
@Table(name = "FILM", schema = "PUBLIC", catalog = "SAKILA")
public class Film implements java.io.Serializable {
private short filmId;
private Language languageByOriginalLanguageId;
private Language languageByLanguageId;
private String title;
private String description;
private Date releaseYear;
private byte rentalDuration;
private BigDecimal rentalRate;
private Short length;
private BigDecimal replacementCost;
private String rating;
private String specialFeatures;
private Date lastUpdate;
private Set<FilmActor> filmActors = new HashSet<FilmActor>(0);
private Set<Inventory> inventories = new HashSet<Inventory>(0);
private Set<Inventory> inventories_1 = new HashSet<Inventory>(0);
private Set<FilmCategory> filmCategories = new HashSet<FilmCategory>(0);
private Set<FilmCategory> filmCategories_1 = new HashSet<FilmCategory>(0);
private Set<FilmActor> filmActors_1 = new HashSet<FilmActor>(0);
public Film() {
}
public Film(short filmId, Language languageByLanguageId, String title,
byte rentalDuration, BigDecimal rentalRate,
BigDecimal replacementCost, Date lastUpdate) {
this.filmId = filmId;
this.languageByLanguageId = languageByLanguageId;
this.title = title;
this.rentalDuration = rentalDuration;
this.rentalRate = rentalRate;
this.replacementCost = replacementCost;
this.lastUpdate = lastUpdate;
}
public Film(short filmId, Language languageByOriginalLanguageId,
Language languageByLanguageId, String title, String description,
Date releaseYear, byte rentalDuration, BigDecimal rentalRate,
Short length, BigDecimal replacementCost, String rating,
String specialFeatures, Date lastUpdate, Set<FilmActor> filmActors,
Set<Inventory> inventories, Set<Inventory> inventories_1,
Set<FilmCategory> filmCategories,
Set<FilmCategory> filmCategories_1, Set<FilmActor> filmActors_1) {
this.filmId = filmId;
this.languageByOriginalLanguageId = languageByOriginalLanguageId;
this.languageByLanguageId = languageByLanguageId;
this.title = title;
this.description = description;
this.releaseYear = releaseYear;
this.rentalDuration = rentalDuration;
this.rentalRate = rentalRate;
this.length = length;
this.replacementCost = replacementCost;
this.rating = rating;
this.specialFeatures = specialFeatures;
this.lastUpdate = lastUpdate;
this.filmActors = filmActors;
this.inventories = inventories;
this.inventories_1 = inventories_1;
this.filmCategories = filmCategories;
this.filmCategories_1 = filmCategories_1;
this.filmActors_1 = filmActors_1;
}
@Id
@Column(name = "FILM_ID", unique = true, nullable = false)
public short getFilmId() {
return this.filmId;
}
public void setFilmId(short filmId) {
this.filmId = filmId;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ORIGINAL_LANGUAGE_ID")
public Language getLanguageByOriginalLanguageId() {
return this.languageByOriginalLanguageId;
}
public void setLanguageByOriginalLanguageId(
Language languageByOriginalLanguageId) {
this.languageByOriginalLanguageId = languageByOriginalLanguageId;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "LANGUAGE_ID", nullable = false)
public Language getLanguageByLanguageId() {
return this.languageByLanguageId;
}
public void setLanguageByLanguageId(Language languageByLanguageId) {
this.languageByLanguageId = languageByLanguageId;
}
@Column(name = "TITLE", nullable = false)
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
@Column(name = "DESCRIPTION")
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
@Temporal(TemporalType.DATE)
@Column(name = "RELEASE_YEAR", length = 8)
public Date getReleaseYear() {
return this.releaseYear;
}
public void setReleaseYear(Date releaseYear) {
this.releaseYear = releaseYear;
}
@Column(name = "RENTAL_DURATION", nullable = false)
public byte getRentalDuration() {
return this.rentalDuration;
}
public void setRentalDuration(byte rentalDuration) {
this.rentalDuration = rentalDuration;
}
@Column(name = "RENTAL_RATE", nullable = false, precision = 4)
public BigDecimal getRentalRate() {
return this.rentalRate;
}
public void setRentalRate(BigDecimal rentalRate) {
this.rentalRate = rentalRate;
}
@Column(name = "LENGTH")
public Short getLength() {
return this.length;
}
public void setLength(Short length) {
this.length = length;
}
@Column(name = "REPLACEMENT_COST", nullable = false, precision = 5)
public BigDecimal getReplacementCost() {
return this.replacementCost;
}
public void setReplacementCost(BigDecimal replacementCost) {
this.replacementCost = replacementCost;
}
@Column(name = "RATING", length = 5)
public String getRating() {
return this.rating;
}
public void setRating(String rating) {
this.rating = rating;
}
@Column(name = "SPECIAL_FEATURES", length = 54)
public String getSpecialFeatures() {
return this.specialFeatures;
}
public void setSpecialFeatures(String specialFeatures) {
this.specialFeatures = specialFeatures;
}
@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 = "film")
public Set<FilmActor> getFilmActors() {
return this.filmActors;
}
public void setFilmActors(Set<FilmActor> filmActors) {
this.filmActors = filmActors;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "film")
public Set<Inventory> getInventories() {
return this.inventories;
}
public void setInventories(Set<Inventory> inventories) {
this.inventories = inventories;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "film")
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 = "film")
public Set<FilmCategory> getFilmCategories() {
return this.filmCategories;
}
public void setFilmCategories(Set<FilmCategory> filmCategories) {
this.filmCategories = filmCategories;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "film")
public Set<FilmCategory> getFilmCategories_1() {
return this.filmCategories_1;
}
public void setFilmCategories_1(Set<FilmCategory> filmCategories_1) {
this.filmCategories_1 = filmCategories_1;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "film")
public Set<FilmActor> getFilmActors_1() {
return this.filmActors_1;
}
public void setFilmActors_1(Set<FilmActor> filmActors_1) {
this.filmActors_1 = filmActors_1;
}
}