- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 44 of file Synonyms.java.
◆ getId()
Long org.turro.elephant.entities.db.Synonyms.getId |
( |
| ) |
|
◆ getSynonyms() [1/4]
static List<Synonyms> org.turro.elephant.entities.db.Synonyms.getSynonyms |
( |
Dao |
dao, |
|
|
String |
word |
|
) |
| |
|
static |
Definition at line 100 of file Synonyms.java.
101 return getSynonyms(dao, word, SQLUtil.MAX_SYNONIMS + 1);
static List< Synonyms > getSynonyms(String word)
◆ getSynonyms() [2/4]
static List<Synonyms> org.turro.elephant.entities.db.Synonyms.getSynonyms |
( |
Dao |
dao, |
|
|
String |
word, |
|
|
int |
max |
|
) |
| |
|
static |
Definition at line 104 of file Synonyms.java.
105 WhereClause wc =
new WhereClause();
106 wc.addClause(
"select s from Synonyms s");
107 wc.addClause(
"left join s.words w");
108 wc.addClause(
"where w like :word");
109 wc.addNamedValue(
"word", SQLHelper.convertToLike(word));
110 return max == 0 ? dao.getResultList(wc) : dao.getResultList(wc, max);
◆ getSynonyms() [3/4]
static List<Synonyms> org.turro.elephant.entities.db.Synonyms.getSynonyms |
( |
String |
word | ) |
|
|
static |
◆ getSynonyms() [4/4]
static List<Synonyms> org.turro.elephant.entities.db.Synonyms.getSynonyms |
( |
String |
word, |
|
|
int |
max |
|
) |
| |
|
static |
◆ getSynonymsByWords()
static List<Synonyms> org.turro.elephant.entities.db.Synonyms.getSynonymsByWords |
( |
String |
phrase | ) |
|
|
static |
Definition at line 82 of file Synonyms.java.
83 ArrayList<Synonyms> synonyms =
new ArrayList<>();
84 if(!Strings.isBlank(phrase)) {
85 for(String word : phrase.split(
"\\s+")) {
86 synonyms.addAll(
getSynonyms(
new ElephantPU(), word));
◆ getWords()
Set<String> org.turro.elephant.entities.db.Synonyms.getWords |
( |
| ) |
|
◆ getWordsString()
String org.turro.elephant.entities.db.Synonyms.getWordsString |
( |
| ) |
|
Definition at line 76 of file Synonyms.java.
77 return String.join(
",", words);
◆ isEmpty()
boolean org.turro.elephant.entities.db.Synonyms.isEmpty |
( |
| ) |
|
◆ setId()
void org.turro.elephant.entities.db.Synonyms.setId |
( |
Long |
id | ) |
|
◆ setWords()
void org.turro.elephant.entities.db.Synonyms.setWords |
( |
Set< String > |
words | ) |
|
The documentation for this class was generated from the following file: