1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.portals.graffito.jcr.query;
18
19 import org.apache.portals.graffito.jcr.exception.IncorrectAtomicTypeException;
20
21
22 /***
23 *
24 * Graffito JCR Filter interface.
25 *
26 * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
27 *
28 */
29 public interface Filter
30 {
31 /***
32 * Set the filter scope. The scope is an Node path specifying where to search in the content tree.
33 * For example,
34 * /mynode/mysecondnode/', the search engine will search on child objects in the /mynode/mysecondnode
35 * /mynode/mysecondnode//', the search engine will search on desncendant objects in the /mynode/mysecondnode (the complete subnode tree)
36 *
37 * @param scope The filter scope
38 *
39 */
40 void setScope(String scope);
41
42
43 /***
44 * Get the filter scope.
45 *
46 * @return The filter scope
47 */
48 String getScope();
49
50
51 /***
52 * Search content based on a fullTextSearch.
53 * Depending on the full text search engine, you can also filter on properties.
54 *
55 * @param scope either a a jcr node or propserty. If a node is used, all properties of this node are searche (following the internal index
56 * @param fullTextSearch The full text search string
57 */
58 Filter addContains(String scope, String fullTextSearch);
59
60 Filter addBetween(String arg0, Object arg1, Object arg2);
61
62 Filter addEqualTo(String arg0, Object arg1);
63
64 Filter addGreaterOrEqualThan(String arg0, Object arg1);
65
66 Filter addGreaterThan(String arg0, Object arg1);
67
68 Filter addLessOrEqualThan(String arg0, Object arg1);
69
70 Filter addLessThan(String arg0, Object arg1);
71
72 Filter addLike(String arg0, Object arg1);
73
74 Filter addNotEqualTo(String arg0, Object arg1);
75
76 Filter addNotNull(String arg0);
77
78 Filter addIsNull(String arg0);
79
80 Filter addOrFilter(Filter arg0);
81
82 Filter addAndFilter(Filter filter);
83
84 Filter addJCRExpression(String jcrExpression);
85
86 Class getFilterClass();
87
88
89 }