public class Query extends Object
| Constructor and Description |
|---|
Query() |
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(String key,
Object value)
In the parameters variable, adds the value to the collection associated with the specified key.
|
protected void |
addSingletonParameter(String key,
Object value)
In the parameters variable, adds the value to the collection associated with the specified key.
|
Collection |
getParameter(String key)
Gets the collection mapped to the specified key.
|
<T> T |
getParameterAsClass(String key,
Class<T> clazz)
Retrieve a parameter as a certain given class
|
org.apache.commons.collections.map.MultiValueMap |
getParameters()
Retrieve the parameters set to this Query object
|
void |
setParameters(org.apache.commons.collections.map.MultiValueMap parameters)
Set the parameters of this query object based on a given
MultiValueMap |
public org.apache.commons.collections.map.MultiValueMap getParameters()
MultiValueMap set to this objectpublic void addParameter(String key, Object value)
Unlike a normal Map the previous value is not replaced.
Instead the new value is added to the collection stored against the key.
key - the key to store againstvalue - the value to add to the collection at the keyprotected void addSingletonParameter(String key, Object value)
Unlike addParameter(String, Object) the previous value is overridden.
First, any existing values are removed, then the new value is added to the collection at the specified key
key - the key to store againstvalue - the value to add to the collection at the keypublic <T> T getParameterAsClass(String key, Class<T> clazz)
key - the key to retrieve the parameter fromclazz - The classtype to retrieve. (If no parameter with that class is found, a null value is returnedpublic Collection getParameter(String key)
get(key).key - the key used to retrieve the collectionpublic void setParameters(org.apache.commons.collections.map.MultiValueMap parameters)
MultiValueMapparameters - a MultiValueMap to set to this Query objectCopyright © 2022 LYRASIS. All rights reserved.