◆ addCondition()
PreprocessClause org.turro.indicator.PreprocessClause.addCondition |
( |
String |
condition | ) |
|
◆ addJoin()
◆ addNamedValue()
PreprocessClause org.turro.indicator.PreprocessClause.addNamedValue |
( |
String |
name, |
|
|
Object |
value |
|
) |
| |
◆ getClause()
WhereClause org.turro.indicator.PreprocessClause.getClause |
( |
| ) |
|
Definition at line 101 of file PreprocessClause.java.
102 if(Strings.isBlank(relatedRoot)) {
WhereClause getRankingClause()
WhereClause getMatchingClause()
◆ getMatchingClause()
WhereClause org.turro.indicator.PreprocessClause.getMatchingClause |
( |
| ) |
|
Definition at line 133 of file PreprocessClause.java.
134 WhereClause wc =
new WhereClause();
135 wc.addClause(
"select new org.turro.matching.GenericMatching(");
136 String relatedConcat = matchingPath ? relatedField :
137 "concat('/" + relatedRoot +
"/'," + relatedField +
")";
138 wc.addClause(pathField +
", " + relatedConcat +
", '" + variable.
getName() +
"', " + aggregate +
")");
139 wc.addClause(
"from " + table);
140 for(String join : joins) {
143 if(!Strings.isBlank(filterEntity)) {
144 wc.addClause(
"where " + pathField +
" like concat(:entity, '%')");
145 wc.addNamedValue(
"entity", filterEntity);
147 wc.addClause(
"where " + pathField +
" like concat('/', :root, '/%')");
148 wc.addNamedValue(
"root", entityRoot);
150 wc.addClause(
"and " + relatedConcat +
" like concat('/', :rroot, '/%')");
151 wc.addNamedValue(
"rroot", relatedRoot);
152 for(String condition : conditions) {
153 wc.addClause(condition);
155 namedValues.keySet().forEach(k -> wc.addNamedValue(k, namedValues.get(k)));
156 wc.addClause(
"group by " + pathField +
"," + relatedConcat);
157 wc.addClause(
"having " + aggregate +
" <> 0");
◆ getRankingClause()
WhereClause org.turro.indicator.PreprocessClause.getRankingClause |
( |
| ) |
|
Definition at line 109 of file PreprocessClause.java.
110 WhereClause wc =
new WhereClause();
111 wc.addClause(
"select new org.turro.ranking.GenericRanking(");
112 wc.addClause(pathField +
", '" + variable.
getName() +
"', " + aggregate +
")");
113 wc.addClause(
"from " + table);
114 for(String join : joins) {
117 if(!Strings.isBlank(filterEntity)) {
118 wc.addClause(
"where " + pathField +
" like concat(:entity, '%')");
119 wc.addNamedValue(
"entity", filterEntity);
121 wc.addClause(
"where " + pathField +
" like concat('/', :root, '/%')");
122 wc.addNamedValue(
"root", entityRoot);
124 for(String condition : conditions) {
125 wc.addClause(condition);
127 namedValues.keySet().forEach(k -> wc.addNamedValue(k, namedValues.get(k)));
128 wc.addClause(
"group by " + pathField);
129 wc.addClause(
"having " + aggregate +
" <> 0");
◆ load()
static PreprocessClause org.turro.indicator.PreprocessClause.load |
( |
String |
table | ) |
|
|
static |
◆ setAggregate()
PreprocessClause org.turro.indicator.PreprocessClause.setAggregate |
( |
String |
aggregate | ) |
|
◆ setFilter()
PreprocessClause org.turro.indicator.PreprocessClause.setFilter |
( |
String |
filterEntity | ) |
|
◆ setMatchingField()
PreprocessClause org.turro.indicator.PreprocessClause.setMatchingField |
( |
String |
pathField | ) |
|
◆ setMatchingIsPath()
◆ setMatchingRoot()
PreprocessClause org.turro.indicator.PreprocessClause.setMatchingRoot |
( |
String |
entityRoot | ) |
|
◆ setRankingField()
PreprocessClause org.turro.indicator.PreprocessClause.setRankingField |
( |
String |
pathField | ) |
|
◆ setRankingRoot()
PreprocessClause org.turro.indicator.PreprocessClause.setRankingRoot |
( |
String |
entityRoot | ) |
|
◆ setVariable()
The documentation for this class was generated from the following file: