Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Comparison |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2009 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 1.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl1.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | ||
17 | package org.kuali.student.r2.common.infc; | |
18 | ||
19 | import java.util.List; | |
20 | ||
21 | /** | |
22 | * Criteria for a generic query | |
23 | */ | |
24 | ||
25 | @Deprecated | |
26 | public interface Comparison { | |
27 | ||
28 | /** | |
29 | * Dot path notation to identity the name of field to be compared. | |
30 | * | |
31 | * @name Field Key | |
32 | */ | |
33 | public String getFieldKey(); | |
34 | ||
35 | /** | |
36 | * Name: Operator | |
37 | * | |
38 | * Operator to use to compare the field to the value. The valid values are:<ol> | |
39 | * <li>= | |
40 | * <li>in | |
41 | * <li>< | |
42 | * <li>!= | |
43 | * <li>>= | |
44 | * <li><= | |
45 | * <li>like | |
46 | * <li>between | |
47 | * </ol> | |
48 | * The operators should work similar to their corresponding SQL operators. | |
49 | * | |
50 | * Complex objects can only be checked to see if they are null or not null. | |
51 | * "in" operator takes a list of values | |
52 | * "between" operator takes two values for from and thru inclusive | |
53 | * all others take a single value | |
54 | * | |
55 | * TODO: Decide for complex Lists can they be checked to see how many occurences they have? | |
56 | * TODO: Decide on other operators | |
57 | * TODO: Deicde on operators to search collections inside such as any | |
58 | * TODO: Decide how to search on dynamic attributes | |
59 | */ | |
60 | public String getOperator(); | |
61 | ||
62 | /** | |
63 | * Values to be compared. | |
64 | * | |
65 | * @name Values | |
66 | */ | |
67 | public List<String> getValues(); | |
68 | ||
69 | ||
70 | /** | |
71 | * Check if should ignore case when doing the comparison Default | |
72 | * is false. If true then the case of both the specified | |
73 | * comparison value(s) and the data value from the field should be | |
74 | * ignored. | |
75 | * | |
76 | * @name Is Ignore Case | |
77 | */ | |
78 | public Boolean getIsIgnoreCase (); | |
79 | } |