@@ -33,6 +33,37 @@ public InterceptorParamBuilder<P, J, E> orderBy(final String orderByClause) {
3333 return this ;
3434 }
3535
36+ /**
37+ * This is where you declare your rules that will construct your query.
38+ * <p>
39+ * - The operators are 'AND' and 'OR' and you may use parentheses '(' and ')' to
40+ * group your sub-expressions.<br>
41+ * {@code Example: 'term1 AND (term2 OR term3)'}<br>
42+ * - Operator precedence automatically is AND before OR.<br>
43+ * - A term starts with a DB-field followed by either an operator and a
44+ * JSON-field, or a null-operator.<br>
45+ * - JSON-fields start with ':' and end on a bracket-expression containing the
46+ * type of field.<br>
47+ * - Allowed fields are:
48+ * {@code string, boolean, int, long, float, double and datetime} (The system
49+ * knows how to convert these to DB-values).<br>
50+ * {@code Example: 'dbFieldName = :jsonName[string] AND dbId = :id[long] OR otherDbField IS NOT NULL AND anotherDbField IS NULL'}<br>
51+ * - When using Enums you have to specify the type of the Enum to cast to
52+ * preceded by a '~'.<br>
53+ * {@code Example: 'dbEnumField = :jsonField[~MyEnumClass]'}<br>
54+ * <p>
55+ * - Term operators are: >, <, >=, <=, = or ==, <> or != and LIKE (which
56+ * automatically adds the wildcards like %yourvalue% before going to the
57+ * database).<br>
58+ * - Every term may be optional when you precede the DB-field-name with a
59+ * '?'.<br>
60+ * {@code Example: '?dbFieldName = :jsonName[string] AND dbId = :id[long]' requested with an empty 'jsonName' will result in 'dbId = :id[long]'}
61+ * Everything is case-insensitive except for the parameters of course.
62+ *
63+ * @param query a string that will be parsed constructing your where-clause and
64+ * all parameter-assignments
65+ * @return itself in order to provide a fluent interface.
66+ */
3667 public InterceptorParamBuilder <P , J , E > query (final String query ) {
3768 this .query = query ;
3869 return this ;
0 commit comments