Java Reference
In-Depth Information
return section;
}
The Article entity class is listed next:
package model;
import java.io.Serializable;
import javax.persistence.*;
@Entity
@NamedQueries({
@NamedQuery(name="findArticleAll", query="SELECT a FROM Article a"),
@NamedQuery(
name="findArticleByTitle",
query="SELECT a from Article a WHERE a.title = :title")
})
public class Article implements Serializable {
static final long serialVersionUID = 1;
private int id;
private String title;
private Section section;
public Article() {
}
public Article(Section section) {
this.section = section;
}
@Id
@GeneratedValue
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
 
Search WWH ::




Custom Search