1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.platform.flavor; |
21 |
|
|
22 |
|
import org.xwiki.extension.Extension; |
23 |
|
import org.xwiki.extension.rating.RatingExtension; |
24 |
|
import org.xwiki.extension.repository.search.ExtensionQuery; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@version |
30 |
|
@since |
31 |
|
|
|
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 8 |
Complexity Density: 0.53 |
|
32 |
|
public class FlavorQuery extends ExtensionQuery |
33 |
|
{ |
34 |
|
|
35 |
|
|
36 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
37 |
0 |
public FlavorQuery()... |
38 |
|
{ |
39 |
0 |
super(); |
40 |
0 |
init(); |
41 |
|
} |
42 |
|
|
43 |
|
|
44 |
|
@param |
45 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
46 |
0 |
public FlavorQuery(String query)... |
47 |
|
{ |
48 |
0 |
super(query); |
49 |
0 |
init(); |
50 |
|
} |
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
55 |
0 |
public FlavorQuery(ExtensionQuery query)... |
56 |
|
{ |
57 |
0 |
super(query); |
58 |
0 |
init(); |
59 |
|
} |
60 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
0 |
private void init()... |
62 |
|
{ |
63 |
0 |
addFilter(Extension.FIELD_CATEGORY, "flavor", ExtensionQuery.COMPARISON.EQUAL); |
64 |
|
} |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
@param |
69 |
|
@return |
70 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
71 |
0 |
public FlavorQuery filterByName(String name)... |
72 |
|
{ |
73 |
0 |
addFilter(Extension.FIELD_NAME, name, COMPARISON.MATCH); |
74 |
0 |
return this; |
75 |
|
} |
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
@param |
80 |
|
@return |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
82 |
0 |
public FlavorQuery filterBySummary(String summary)... |
83 |
|
{ |
84 |
0 |
addFilter(Extension.FIELD_SUMMARY, summary, COMPARISON.MATCH); |
85 |
0 |
return this; |
86 |
|
} |
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
@param |
91 |
|
@return |
92 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
93 |
0 |
public FlavorQuery orderByName(ORDER order)... |
94 |
|
{ |
95 |
0 |
addSort(Extension.FIELD_NAME, order); |
96 |
0 |
return this; |
97 |
|
} |
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
@param |
102 |
|
@return |
103 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
104 |
0 |
public FlavorQuery orderByRating(ORDER order)... |
105 |
|
{ |
106 |
0 |
addSort(RatingExtension.FIELD_AVERAGE_VOTE, order); |
107 |
0 |
return this; |
108 |
|
} |
109 |
|
|
110 |
|
} |