18 package org.turro.financials.product;
20 import java.util.LinkedList;
21 import org.turro.string.Strings;
22 import org.turro.elephant.db.WhereClause;
23 import org.turro.financials.db.FinancialsPU;
24 import org.turro.financials.entity.Product;
25 import org.turro.jpa.Dao;
26 import org.turro.zkoss.input.GenericCombobox;
39 public void populateList(String value, LinkedList list,
int nRows) {
42 wc.
addClause(
"select product from Product as product");
45 if(!Strings.isBlank(value)) {
47 wc.
addLikeFields(
new String[] {
"product.description" }, value);
50 wc.
addClause(
" product.productCode = :pcode");
52 wc.
addClause(
"order by product.description");
54 list.addAll(dao.getResultList(wc, nRows));
void setPrefix(String prefix)
void addClause(String clause)
void addLikeFields(String[] fields, String value)
void addNamedValue(String name, Object value)
void populateList(String value, LinkedList list, int nRows)
void setProductId(long id)
String getTextFromObject(Product value)