19 package org.turro.sql;
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.elephant.entities.db.Synonyms;
33 public static final int
47 for(String field : fields) {
48 wc.
addClause(sep + field +
" like :search01");
54 if(!synonyms.isEmpty() && synonyms.size() <=
MAX_SYNONIMS) {
56 for(String field : fields) {
57 for(String w : s.getWords()) {
58 wc.
addClause(sep + field +
" like :w" + Strings.identifier(w));
80 if(!synonyms.isEmpty() && synonyms.size() <=
MAX_SYNONIMS) {
82 for(String w : s.getWords()) {
83 if(!search.toLowerCase().contains(w.toLowerCase())) {
91 wc.
addClause(
"match(" + fields +
") against (:fsearch01)");
static String convertToPartialLike(String value)
void setUseNative(boolean useNative)
void setOrderByClause(String orderByClause)
void addClause(String clause)
void addNamedValue(String name, Object value)
static List< Synonyms > getSynonymsByWords(String phrase)
static void applySearchToQuery(String search, WhereClause wc, List< String > fields, boolean withSynonyms, boolean orEd)
static void applyFullsearchToQuery(String search, WhereClause wc, String fields, boolean withSynonyms, boolean orEd)
static void applyFullsearchToQuery(String search, WhereClause wc, String fields, boolean withSynonyms)
static void applyFullsearchToQuery(String search, WhereClause wc, String fields)
static void applySearchToQuery(String search, WhereClause wc, List< String > fields, boolean withSynonyms)
static final int MAX_SYNONIMS
static void applySearchToQuery(String search, WhereClause wc, List< String > fields)