19 package org.turro.students.model;
21 import java.util.List;
22 import org.turro.string.Strings;
23 import org.turro.elephant.db.SQLHelper;
24 import org.turro.elephant.db.WhereClause;
25 import org.turro.jpa.Dao;
26 import org.turro.students.db.StudentsPU;
27 import org.turro.students.entities.Challenge;
28 import org.zkoss.bind.annotation.Command;
29 import org.zkoss.bind.annotation.NotifyChange;
37 private String searchValue;
42 @NotifyChange(
"model")
48 wc.
addClause(
"select s from Challenge s");
50 if(!Strings.isBlank(searchValue)) {
51 wc.
addClause(
"and s.question like :searchValue");
56 return getDao().getResultList(wc);
64 this.searchValue = searchValue;
71 private Dao getDao() {
static String convertToPartialLike(String value)
void addClause(String clause)
void addNamedValue(String name, Object value)
void setSearchValue(String searchValue)
List< Challenge > getModel()