18 package org.turro.publication.zul.www;
20 import java.util.List;
21 import org.turro.string.Strings;
22 import org.turro.elephant.db.WhereClause;
23 import org.turro.publication.db.PublicationPU;
24 import org.turro.publication.entity.Publication;
33 private String author;
34 private List<String> pathList;
35 private long group, category;
50 this.category = category;
66 this.ordering = ordering;
74 this.pathList = pathList;
79 wc.
addClause(
"select publication from Publication publication");
80 wc.
addClause(
"where publication.accepted = true");
81 wc.
addClause(
"and publication.publicationGroup.publishable = true");
82 wc.
addClause(
"and publication.publicationCategory.publishable = true");
84 wc.
addClause(
"and publication.publicationGroup.id = :group");
88 wc.
addClause(
"and publication.publicationCategory.id = :category");
91 if(!Strings.isBlank(author)) {
92 wc.
addClause(
"and publication.author = :author");
95 if(pathList !=
null && !pathList.isEmpty()) {
103 String result =
null;
104 for(String s : paths) {
105 result = (String) ((result ==
null) ? s.substring(13) : (result +
"," + s.substring(13)));
void addClause(String clause)
void addNamedValue(String name, Object value)
String convertToIn(List< String > paths)
List< String > getPathList()
void setPathList(List< String > pathList)
List< Publication > getPublications(int max)
void setAuthor(String author)
PublicationOrdering getOrdering()
void setGroup(long group)
void setOrdering(PublicationOrdering ordering)
void setCategory(long category)