|
| ForumIndicator () |
|
void | initIndicator () |
|
void | prepareIndicator () |
|
void | generateSiblings () |
|
String | getRoot () |
|
List< IndicatorVariable > | getVariables () |
|
List< IndicatorVariable > | getAllVariables () |
|
IndicatorVariable | getVariable (String name) |
|
List< IndicatorVariable > | getAllRankingVariables (String root) |
|
List< IndicatorVariable > | getAllMatchingVariables (String root) |
|
double | getValue (IndicatorVariable variable, Object entity) |
|
double | getValue (IndicatorVariable variable, Object entity, String relatedPath) |
|
IndicatorResult | readIndicator (String storeClass, String indicator) |
|
void | preprocess (IndicatorVariable variable, IPreprocessor preprocessor, String entityRoot, String relatedRoot) |
|
void | postprocess (IndicatorVariable variable, IPreprocessor postprocessor, String entityRoot, String relatedRoot) |
|
Stream< String > | getEntityPaths (String root) |
|
Stream< GenericSiblings > | getSiblingPaths (String entityPath) |
|
Dao | getDao () |
|
boolean | itsMine (String root) |
|
boolean | itsMine (IndicatorVariable variable) |
|
|
void | initVariables () |
|
void | initExternalVariables () |
|
Dao | createDao () |
|
void | processRankingVariable (Dao dao, IPreprocessor preprocessor, IndicatorVariable variable, String entityRoot) |
|
void | processMatchingVariable (Dao dao, IPreprocessor preprocessor, IndicatorVariable variable, String entityRoot, String relatedRoot) |
|
void | addVariable (String name, VariableType type) |
|
void | addVariable (String name, VariableType type, boolean reversed) |
|
void | addVariable (String name, VariableType type, String avoid) |
|
void | addVariable (String name, boolean preprocess, VariableType type) |
|
void | addVariable (String name, boolean preprocess, VariableType type, boolean reversed) |
|
void | addVariable (String name, boolean preprocess, VariableType type, String avoid) |
|
void | addExternalVariable (String root, String name) |
|
String | getPath (Object entity) |
|
void | postprocessRankingVariable (Dao dao, IPreprocessor postprocessor, IndicatorVariable variable, String entityRoot) |
|
void | postprocessMatchingVariable (Dao dao, IPreprocessor postprocessor, IndicatorVariable variable, String entityRoot, String relatedRoot) |
|
◆ ForumIndicator()
org.turro.indicator.ForumIndicator.ForumIndicator |
( |
| ) |
|
◆ createDao()
Dao org.turro.indicator.ForumIndicator.createDao |
( |
| ) |
|
|
protected |
◆ initExternalVariables()
void org.turro.indicator.ForumIndicator.initExternalVariables |
( |
| ) |
|
|
protected |
◆ initVariables()
void org.turro.indicator.ForumIndicator.initVariables |
( |
| ) |
|
|
protected |
◆ processMatchingVariable()
void org.turro.indicator.ForumIndicator.processMatchingVariable |
( |
Dao |
dao, |
|
|
IPreprocessor |
preprocessor, |
|
|
IndicatorVariable |
variable, |
|
|
String |
entityRoot, |
|
|
String |
relatedRoot |
|
) |
| |
|
protected |
Reimplemented from org.turro.indicator.AbstractIndicator.
Definition at line 110 of file ForumIndicator.java.
111 WhereClause wc =
null;
112 if(
"contact".equals(relatedRoot)) {
113 switch(variable.getName()) {
115 wc = PreprocessClause.load(
"Topic")
116 .setRankingRoot(entityRoot)
117 .setMatchingRoot(relatedRoot)
118 .setRankingField(
"entityPath")
119 .setMatchingField(
"authorId")
120 .setVariable(variable)
121 .setAggregate(
"count(id)")
125 wc = PreprocessClause.load(
"Post")
126 .setRankingRoot(entityRoot)
127 .setMatchingRoot(relatedRoot)
128 .setRankingField(
"topic.entityPath")
129 .setMatchingField(
"authorId")
130 .setVariable(variable)
131 .setAggregate(
"count(id)")
137 try(Stream<GenericMatching> stream = dao.stream(GenericMatching.class, wc, 1000)) {
138 stream.forEach(m -> {
139 preprocessor.poolInstance(m.copyTo((IMatching) preprocessor.createInstance()));
141 preprocessor.finishPreprocessor();
◆ processRankingVariable()
Reimplemented from org.turro.indicator.AbstractIndicator.
Definition at line 58 of file ForumIndicator.java.
59 WhereClause wc =
null;
60 if(
"contact".equals(entityRoot)) {
61 switch(variable.getName()) {
63 wc = PreprocessClause.load(
"Topic")
64 .setRankingRoot(entityRoot)
65 .setRankingField(
"concat('/contact/', authorId)")
66 .setVariable(variable)
67 .setAggregate(
"count(id)")
71 wc = PreprocessClause.load(
"Post")
72 .setRankingRoot(entityRoot)
73 .setRankingField(
"concat('/contact/', authorId)")
74 .setVariable(variable)
75 .setAggregate(
"count(id)")
80 switch(variable.getName()) {
82 wc = PreprocessClause.load(
"Topic")
83 .setRankingRoot(entityRoot)
84 .setRankingField(
"entityPath")
85 .setVariable(variable)
86 .setAggregate(
"count(id)")
90 wc = PreprocessClause.load(
"Post")
91 .setRankingRoot(entityRoot)
92 .setRankingField(
"topic.entityPath")
93 .setVariable(variable)
94 .setAggregate(
"count(id)")
100 try(Stream<GenericRanking> stream = dao.stream(GenericRanking.class, wc, 1000)) {
101 stream.forEach(r -> {
102 preprocessor.poolInstance(r.copyTo((IRanking) preprocessor.createInstance()));
104 preprocessor.finishPreprocessor();
The documentation for this class was generated from the following file: