BrightSide Workbench Full Report + Source Code
org.turro.newsletter.NewsletterGrid Class Reference
Inheritance diagram for org.turro.newsletter.NewsletterGrid:
Collaboration diagram for org.turro.newsletter.NewsletterGrid:

Public Member Functions

 NewsletterGrid ()
 
void setValues (boolean accepted, NotificationCategory 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 createNewsletterCriteria (boolean accepted, NotificationCategory category, String text)
 

Detailed Description

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

Definition at line 50 of file NewsletterGrid.java.

Constructor & Destructor Documentation

◆ NewsletterGrid()

org.turro.newsletter.NewsletterGrid.NewsletterGrid ( )

Definition at line 54 of file NewsletterGrid.java.

54  {
55  addColumns();
56  }

Member Function Documentation

◆ createNewsletterCriteria()

static WhereClause org.turro.newsletter.NewsletterGrid.createNewsletterCriteria ( boolean  accepted,
NotificationCategory  category,
String  text 
)
static

Definition at line 137 of file NewsletterGrid.java.

137  {
138  WhereClause wc = new WhereClause();
139  wc.addClause("select newsletter from Newsletter newsletter");
140  wc.addClause("where newsletter.accepted = :accepted");
141  wc.addNamedValue("accepted", accepted);
142  if(category != null) {
143  wc.addClause("and newsletter.idCategory = :category");
144  wc.addNamedValue("category", category.getIdCategory());
145  }
146  if(!Strings.isBlank(text)) {
147  text = "*" + text + "*";
148  wc.addClause("and newsletter.title like :text1");
149  wc.addNamedValue("text1", text.replaceAll("\\*", "%"));
150  // missing sections body
151  }
152  wc.addClause("order by newsletter.date DESC");
153  return wc;
154  }
Here is the call graph for this function:

◆ setValues()

void org.turro.newsletter.NewsletterGrid.setValues ( boolean  accepted,
NotificationCategory  category,
String  text 
)

Definition at line 58 of file NewsletterGrid.java.

58  {
59  addRows(accepted, category, text);
60  }

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