Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AttributeLookupSettings |
|
| 1.0;1 |
1 | package org.kuali.rice.core.api.uif; | |
2 | ||
3 | /** | |
4 | * Defines configuration for an attribute which may be used as part of a lookups. This includes indicating if the | |
5 | * field is displayed in the lookup criteria or lookup result set, as well as defining information about this field | |
6 | * if it used as part of a range-based lookup. | |
7 | * | |
8 | * <p>The range bounds allows the party executing the lookup against this attribute to enter a value for both ends | |
9 | * (lower and upper bounds) in order to determine if the attribute is "between" those two values.</p> | |
10 | * | |
11 | * <p>Note that an attribute range only makes sense if the {@code DataType} of the attribute is | |
12 | * a date or numerical data type. The consumer of these settings is free to ignore the given | |
13 | * attribute range information if it does not believe it is possible to successfully present a range-based | |
14 | * lookup option based on the data type (or other settings) of the {@code AttributeField}.</p> | |
15 | * | |
16 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
17 | */ | |
18 | public interface AttributeLookupSettings { | |
19 | ||
20 | /** | |
21 | * Returns true if this field should be included as part of the lookup criteria, false if not. | |
22 | * | |
23 | * @return true if this field should be included as part of the lookup criteria, false if not | |
24 | */ | |
25 | boolean isInCriteria(); | |
26 | ||
27 | /** | |
28 | * Returns true if this field should be included in the result set of the lookup, false if not. | |
29 | * | |
30 | * @return true if this field should be included in the result set of the lookup, false if not | |
31 | */ | |
32 | boolean isInResults(); | |
33 | ||
34 | /** | |
35 | * Returns true if lookups against this field should be handled as a lookup operation supporting a range-based | |
36 | * search of data against the field. | |
37 | * | |
38 | * @return true if lookups against this attribute should allow for ranged lookup fields, false otherwise | |
39 | */ | |
40 | boolean isRanged(); | |
41 | ||
42 | /** | |
43 | * Returns the name to assign to the lower bound of the range. It is important to ensure that this | |
44 | * does not conflict with any other attribute names being used on the lookup. | |
45 | * | |
46 | * @return the name of the lower bound of the range | |
47 | */ | |
48 | String getLowerBoundName(); | |
49 | ||
50 | /** | |
51 | * Returns the label to use for the lower bound of the range. If no label is defined, then the | |
52 | * framework will generate one. | |
53 | * | |
54 | * @return the label of the lower bound of the range | |
55 | */ | |
56 | String getLowerBoundLabel(); | |
57 | ||
58 | ||
59 | /** | |
60 | * Returns true if the lower bound should be treated as inclusive when executing a ranged | |
61 | * lookup against the attribute, false if it should be treated as exclusive. | |
62 | * | |
63 | * @return true if the lower bound is inclusive, false if it is exclusive | |
64 | */ | |
65 | boolean isLowerBoundInclusive(); | |
66 | ||
67 | /** | |
68 | * Returns the name to assign to the upper bound of the range. It is important to ensure that this | |
69 | * does not conflict with any other attribute names being used on the lookup. | |
70 | * | |
71 | * @return the name of the upper bound of the range | |
72 | */ | |
73 | String getUpperBoundName(); | |
74 | ||
75 | /** | |
76 | * Returns the label to use for the upper bound of the range. If no label is defined, then the | |
77 | * framework will generate one. | |
78 | * | |
79 | * @return the label of the upper bound of the range | |
80 | */ | |
81 | String getUpperBoundLabel(); | |
82 | ||
83 | /** | |
84 | * Returns true if the upper bound should be treated as inclusive when executing a ranged | |
85 | * lookup against the attribute, false if it should be treated as exclusive. | |
86 | * | |
87 | * @return true if the upper bound is inclusive, false if it is exclusive | |
88 | */ | |
89 | boolean isUpperBoundInclusive(); | |
90 | ||
91 | /** | |
92 | * Indicates if lookups which use this attribute should execute the lookup against this attribute | |
93 | * in a case sensitive fashion. If this method returns null, it means that the system-level | |
94 | * default for case sensitivity of attributes on lookups should be used. | |
95 | * | |
96 | * @return true if the attribute should be case sensitive on lookups, false if it should not, and | |
97 | * null if the system-level default should be used | |
98 | */ | |
99 | Boolean isCaseSensitive(); | |
100 | ||
101 | } |