Java Reference
In-Depth Information
// Constructors...
protected Book() {
}
public Book(String title, int pages) {
this.title = title;
this.pages = pages;
}
// Getters...
@Id
@GeneratedValue
public int getId() {
return id;
}
@Column(name = "working_title", length = 200, nullable = false)
public String getTitle() {
return title;
}
public int getPages() {
return pages;
}
@Transient
public Date getPublicationDate() {
return publicationDate;
}
@ManyToOne
@JoinColumn(name = "publisher_id")
public Publisher getPublisher() {
return publisher;
}
@ManyToMany(cascade = ALL)
public Set<Author> getAuthors() {
return authors;
}
// Setters...
Search WWH ::




Custom Search