BrightSide Workbench Full Report + Source Code
org.turro.publication.zul.ctrl.PublicationGrid Class Reference
Inheritance diagram for org.turro.publication.zul.ctrl.PublicationGrid:
Collaboration diagram for org.turro.publication.zul.ctrl.PublicationGrid:

Public Member Functions

 PublicationGrid ()
 
void setValues (String idContact, boolean accepted, PublicationCategory category, String text)
 
- Public Member Functions inherited from org.turro.zkoss.grid.PagingGrid
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void refine ()
 
boolean isDefaultBehavior ()
 
void setDefaultBehavior (boolean defaultBehavior)
 
String getRefineValue ()
 
void setRefineValue (String value)
 
int getMaxResults ()
 
void setMaxResults (int maxResults)
 
String getPagingMold ()
 
void setPagingMold (String pagingMold)
 
int getRowCount ()
 
void setRowCount (int rows)
 
void setHeadersVisible (boolean value)
 
boolean isHeadersVisible ()
 
String getVarColumns ()
 
void setVarColumns (String varColumns)
 
Collection< String > getVarColumnsList (String defaultCols)
 
void addDetailColumn ()
 
void addDetailColumn (HtmlBasedComponent caption)
 
void openDetails ()
 
boolean isEmpty ()
 
void clearColumns ()
 
void clearRows ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Static Public Member Functions

static WhereClause createPublicationCriteria (String idContact, boolean accepted, PublicationCategory category, String text)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 44 of file PublicationGrid.java.

Constructor & Destructor Documentation

◆ PublicationGrid()

org.turro.publication.zul.ctrl.PublicationGrid.PublicationGrid ( )

Definition at line 48 of file PublicationGrid.java.

48  {
49  addColumns();
50  PublicationPU.convertUrls();
51  }
Here is the call graph for this function:

Member Function Documentation

◆ createPublicationCriteria()

static WhereClause org.turro.publication.zul.ctrl.PublicationGrid.createPublicationCriteria ( String  idContact,
boolean  accepted,
PublicationCategory  category,
String  text 
)
static

Definition at line 141 of file PublicationGrid.java.

141  {
142  WhereClause wc = new WhereClause();
143  wc.addClause("select publication from Publication publication");
144  wc.addClause("where publication.accepted = :accepted");
145  wc.addNamedValue("accepted", accepted);
146  if(category != null) {
147  wc.addClause("and publication.publicationCategory = :category");
148  wc.addNamedValue("category", category);
149  }
150  if(idContact != null) {
151  wc.addClause("and publication.idContact = :idContact");
152  wc.addNamedValue("idContact", idContact);
153  }
154  if(!Strings.isBlank(text)) {
155  text = "*" + text + "*";
156  wc.addClause("and (publication.title like :text1");
157  wc.addNamedValue("text1", text.replaceAll("\\*", "%"));
158  wc.addClause("or publication.summary like :text2)");
159  wc.addNamedValue("text2", text.replaceAll("\\*", "%"));
160  }
161  wc.addClause("order by publication.date DESC");
162  return wc;
163  }
Here is the call graph for this function:

◆ setValues()

void org.turro.publication.zul.ctrl.PublicationGrid.setValues ( String  idContact,
boolean  accepted,
PublicationCategory  category,
String  text 
)

Definition at line 53 of file PublicationGrid.java.

53  {
54  addRows(idContact, accepted, category, text);
55  }

The documentation for this class was generated from the following file: