Class FieldWithQueryParameters<T extends QueryParameter>
java.lang.Object
org.springframework.data.solr.core.query.SimpleField
org.springframework.data.solr.core.query.FieldWithQueryParameters<T>
- Type Parameters:
T-
- Direct Known Subclasses:
FacetOptions.FieldWithFacetParameters,FacetOptions.FieldWithRangeParameters,HighlightOptions.FieldWithHighlightParameters
public class FieldWithQueryParameters<T extends QueryParameter>
extends SimpleField
implements Iterable<T>
Field that holds additional parameters to provide query hints to solr.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQueryParameter(T parameter) getQueryParameter(String parameterName) Get the parameter for given name.Get Collection of all parameters<S> SgetQueryParameterValue(String parameterName) Get value of given parameterbooleaniterator()removeQueryParameter(String parameterName) remove parameter with given nameMethods inherited from class org.springframework.data.solr.core.query.SimpleField
equals, getName, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FieldWithQueryParameters
- Parameters:
fieldname- must not be null
-
-
Method Details
-
getQueryParameter
Get the parameter for given name.- Parameters:
parameterName-- Returns:
- null if parameter does not exist
-
addQueryParameter
- Parameters:
parameter- must not be null
-
removeQueryParameter
remove parameter with given name- Parameters:
parameterName-
-
getQueryParameters
Get Collection of all parameters- Returns:
-
hasQueryParameters
public boolean hasQueryParameters()- Returns:
- true if parameters present
-
getQueryParameterValue
Get value of given parameter- Parameters:
parameterName-- Returns:
- null if no parameter with given name present
-
iterator
- Specified by:
iteratorin interfaceIterable<T extends QueryParameter>
-