19 package org.turro.jpa.search;
21 import java.io.Serializable;
22 import java.util.ArrayList;
23 import java.util.HashMap;
24 import java.util.List;
25 import org.turro.string.Strings;
26 import org.jdom.Attribute;
27 import org.jdom.Element;
28 import org.turro.elephant.context.IConstructor;
29 import org.turro.elephant.db.WhereClause;
30 import org.turro.sql.SQLUtil;
38 private final String type, name;
39 private String tag, value;
40 private final HashMap<String, String> attributes;
41 private final ArrayList<String> options;
46 attributes =
new HashMap<>();
47 options =
new ArrayList<>();
63 return value ==
null ?
"" : value;
67 return value ==
null ? defaultValue : value;
84 for(Object attr : item.getAttributes()) {
85 if(attr instanceof Attribute) {
86 Attribute attribute = (Attribute) attr;
87 String name = attribute.getName();
88 if(!name.equals(
"name") && !name.equals(
"type")) {
89 attributes.put(name, attribute.getValue());
93 for(Element option : (List<Element>) item.getChildren()) {
94 options.add(option.getTextNormalize());
void readXML(Element item)
boolean applyToQueryFull(WhereClause wc, String fields, boolean withSynonyms)
ArrayList< String > getOptions()
void readParam(IConstructor constructor)
boolean applyToQuery(WhereClause wc, List< String > fields, boolean withSynonyms)
HashMap< String, String > getAttributes()
void setValue(String value)
DaoSearchKey(String name, String type)
String getValue(String defaultValue)
static void applyFullsearchToQuery(String search, WhereClause wc, String fields)
static void applySearchToQuery(String search, WhereClause wc, List< String > fields)
String getParameter(String param)