public class AttributeQueryServiceImpl extends Object implements AttributeQueryService
AttributeQueryService
that prepares the attribute queries and
delegates to the LookupService
Constructor and Description |
---|
AttributeQueryServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected Collection<?> |
executeAttributeQueryCriteria(AttributeQuery attributeQuery,
Map<String,String> queryParameters,
Map<String,String> additionalCriteria,
List<String> wildcardAsLiteralPropertyNames)
Prepares a query using the configured data object, parameters, and criteria, then executes
the query and returns the result Collection
|
protected Object |
executeAttributeQueryMethod(AttributeQuery attributeQuery,
Map<String,String> queryParameters,
boolean isSuggestQuery,
String queryTerm)
Prepares the method configured on the attribute query then performs the method invocation
|
protected ConfigurationService |
getConfigurationService()
Gets the configuration service
|
protected LookupService |
getLookupService()
Gets the lookup service
|
AttributeQueryResult |
performFieldQuery(ViewPostMetadata viewPostMetadata,
String fieldId,
Map<String,String> queryParameters)
Executes the
AttributeQuery associated with the field given by the id. |
AttributeQueryResult |
performFieldSuggestQuery(ViewPostMetadata viewPostMetadata,
String fieldId,
String fieldTerm,
Map<String,String> queryParameters)
Executes the
AttributeQuery associated with the Suggest widget within
the field given by the Id. |
protected void |
retrievePropertiesOnResults(AttributeQueryResult queryResult,
Collection<?> results,
Suggest.SuggestPostData suggestPostData)
Instead of returning the full object this method fills in queryResult with data that contain the properties
of each result object, as configured through the fieldSuggest, from the set of results.
|
void |
setConfigurationService(ConfigurationService configurationService)
Sets the configuration service
|
void |
setLookupService(LookupService lookupService)
Sets the lookup service
|
public AttributeQueryServiceImpl()
public AttributeQueryResult performFieldSuggestQuery(ViewPostMetadata viewPostMetadata, String fieldId, String fieldTerm, Map<String,String> queryParameters)
AttributeQuery
associated with the Suggest
widget within
the field given by the Id. The given Map of key/value pairs are used to populate the criteria part of the
attribute query or as arguments to the query method. The fieldTerm parameter gives the current value
of the field that should be matched on. The query is expected to return a list of values to suggestperformFieldSuggestQuery
in interface AttributeQueryService
viewPostMetadata
- - post metadata related to the fieldfieldId
- - id for the attribute field to perform the query forfieldTerm
- - the partial value of the query field to matchqueryParameters
- - map of key/value pairs that are parameters to the queryprotected void retrievePropertiesOnResults(AttributeQueryResult queryResult, Collection<?> results, Suggest.SuggestPostData suggestPostData)
queryResult
- the queryResult to fill inresults
- the set of original resultssuggestPostData
- post data for the suggest widgetpublic AttributeQueryResult performFieldQuery(ViewPostMetadata viewPostMetadata, String fieldId, Map<String,String> queryParameters)
AttributeQuery
associated with the field given by the id. The given Map of key/value
pairs are used to populate the criteria part of the attribute query or as arguments to the query method.
The query is expected to return a Map of field name/value pairs (unlike the suggest query which just returns
values for one field)performFieldQuery
in interface AttributeQueryService
viewPostMetadata
- - post metadata related to the fieldfieldId
- - id for the attribute field to perform the query forqueryParameters
- - map of key/value pairs that are parameters to the queryprotected Object executeAttributeQueryMethod(AttributeQuery attributeQuery, Map<String,String> queryParameters, boolean isSuggestQuery, String queryTerm)
attributeQuery
- attribute query instance to executequeryParameters
- map of query parameters that provide values for the method argumentsisSuggestQuery
- indicates whether the query is for forming suggest optionsqueryTerm
- if being called for a suggest, the term for the query fieldprotected Collection<?> executeAttributeQueryCriteria(AttributeQuery attributeQuery, Map<String,String> queryParameters, Map<String,String> additionalCriteria, List<String> wildcardAsLiteralPropertyNames)
attributeQuery
- attribute query instance to perform query forqueryParameters
- map of parameters that will be used in the query criteriaadditionalCriteria
- map of additional name/value pairs to add to the critierawildcardAsLiteralPropertyNames
- - List of property names with wildcards disabledprotected LookupService getLookupService()
public void setLookupService(LookupService lookupService)
lookupService
- protected ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
configurationService
- Copyright © 2005–2015 The Kuali Foundation. All rights reserved.