EQL problem
batorgil.kh.batorgil.yahoo.com Sep 19, 2010 3:11 AMHi Guys...
I've a problem that is on seam EQLanguage...I'm developing seam web app.
I trying to by choosing article from section and category which are entity bean..
Article bean
`@Entity
@Table(name = "article", catalog = "techportal")
public class Article implements java.io.Serializable {
private Integer id;
private User userByEditorId;
private User userByAuthorId;
private Section section;
private Category category;
private String title;
private String intro;
private String content;
private String state;
private Date created;
private Date modfied;
private Date published;
private Integer hitcount;
private Set<Comment> comments = new HashSet<Comment>(0);
private String coverpic;
public Article() {
}
`
Section bean
`
@Entity
@Table(name = "section", catalog = "techportal")
public class Section implements java.io.Serializable {
private Integer id;
private String name;
private Set<Article> articles = new HashSet<Article>(0);
private Set<Category> categories = new HashSet<Category>(0);
public Section() {
}
public Section(String name) {
this.name = name;
}
public Section(String name, Set<Article> articles,
Set<Category> categories) {
this.name = name;
this.articles = articles;
this.categories = categories;
}
`
Category bean
`@Entity
@Table(name = "category", catalog = "techportal")
public class Category implements java.io.Serializable {
private Integer id;
private Section section;
private String name;
private Set<Article> articles = new HashSet<Article>(0);
public Category() {
}
public Category(Section section, String name) {
this.section = section;
this.name = name;
}
public Category(Section section, String name, Set<Article> articles) {
this.section = section;
this.name = name;
this.articles = articles;
}
`
hierarchy is :
section -> category -> Article.
Category : new product , game , advice
I tried to filtering articles from new product category.
I've a problem that is on seam EQLanguage...I'm developing seam web app.
I trying to by choosing article from section and category which are entity bean..
Article bean
`@Entity
@Table(name = "article", catalog = "techportal")
public class Article implements java.io.Serializable {
private Integer id;
private User userByEditorId;
private User userByAuthorId;
private Section section;
private Category category;
private String title;
private String intro;
private String content;
private String state;
private Date created;
private Date modfied;
private Date published;
private Integer hitcount;
private Set<Comment> comments = new HashSet<Comment>(0);
private String coverpic;
public Article() {
}
`
Section bean
`
@Entity
@Table(name = "section", catalog = "techportal")
public class Section implements java.io.Serializable {
private Integer id;
private String name;
private Set<Article> articles = new HashSet<Article>(0);
private Set<Category> categories = new HashSet<Category>(0);
public Section() {
}
public Section(String name) {
this.name = name;
}
public Section(String name, Set<Article> articles,
Set<Category> categories) {
this.name = name;
this.articles = articles;
this.categories = categories;
}
`
Category bean
`@Entity
@Table(name = "category", catalog = "techportal")
public class Category implements java.io.Serializable {
private Integer id;
private Section section;
private String name;
private Set<Article> articles = new HashSet<Article>(0);
public Category() {
}
public Category(Section section, String name) {
this.section = section;
this.name = name;
}
public Category(Section section, String name, Set<Article> articles) {
this.section = section;
this.name = name;
this.articles = articles;
}
`
hierarchy is :
section -> category -> Article.
Category : new product , game , advice
I tried to filtering articles from new product category.