19 package org.turro.alliance.www;
21 import java.util.Collections;
22 import java.util.List;
23 import org.turro.alliance.db.AlliancePU;
24 import org.turro.alliance.db.entities.AxCenter;
25 import org.turro.alliance.db.entities.AxStudent;
26 import org.turro.jpa.Dao;
27 import org.turro.sql.SqlClause;
28 import org.turro.string.Strings;
29 import org.turro.util.Cached;
30 import org.zkoss.bind.annotation.Command;
31 import org.zkoss.bind.annotation.NotifyChange;
41 private String search;
51 @NotifyChange(
"model")
53 public
void search() {
60 if(Strings.isBlank(search))
return Collections.EMPTY_LIST;
61 return SqlClause.select(
"c").from(
"AxStudent c")
62 .where().partial(search,
"c.name",
"c.email")
70 private final Cached<Dao> dao = Cached.instance(() ->
new AlliancePU());
void setSearch(String search)
List< AxStudent > getModel()