Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AttributeQueryService |
|
| 1.0;1 |
1 | package org.kuali.rice.krad.uif.service; | |
2 | ||
3 | import org.kuali.rice.krad.uif.container.View; | |
4 | import org.kuali.rice.krad.uif.field.AttributeQueryResult; | |
5 | ||
6 | import java.util.Map; | |
7 | ||
8 | /** | |
9 | * Provides methods for executing <code>AttributeQuery</code> instances | |
10 | * and preparing the <code>AttributeQueryResult</code> with the result of the query | |
11 | * | |
12 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
13 | */ | |
14 | public interface AttributeQueryService { | |
15 | ||
16 | /** | |
17 | * Executes the <code>AttributeQuery</code> associated with the <code>Suggest</code> widget within | |
18 | * the field given by the Id. The given Map of key/value pairs are used to populate the criteria part of the | |
19 | * attribute query or as arguments to the query method. The fieldTerm parameter gives the current value | |
20 | * of the field that should be matched on. The query is expected to return a list of values to suggest | |
21 | * | |
22 | * @param view - view instance for which the field belongs | |
23 | * @param fieldId - id for the attribute field to perform the query for | |
24 | * @param fieldTerm - the partial value of the query field to match | |
25 | * @param queryParameters - map of key/value pairs that are parameters to the query | |
26 | * @return AttributeQueryResult instance populated with the List<String> data field of result data | |
27 | */ | |
28 | public AttributeQueryResult performFieldSuggestQuery(View view, String fieldId, String fieldTerm, | |
29 | Map<String, String> queryParameters); | |
30 | ||
31 | /** | |
32 | * Executes the <code>AttributeQuery</code> associated with the field given by the id. The given Map of key/value | |
33 | * pairs are used to populate the criteria part of the attribute query or as arguments to the query method. | |
34 | * The query is expected to return a Map of field name/value pairs (unlike the suggest query which just returns | |
35 | * values for one field) | |
36 | * | |
37 | * @param view - view instance for which the field belongs | |
38 | * @param fieldId - id for the attribute field to perform the query for | |
39 | * @param queryParameters - map of key/value pairs that are parameters to the query | |
40 | * @return AttributeQueryResult instance populated with the Map<String, String> of result field data | |
41 | */ | |
42 | public AttributeQueryResult performFieldQuery(View view, String fieldId, Map<String, String> queryParameters); | |
43 | } |