public interface QueryBuilder
| Modifier and Type | Method and Description |
|---|---|
QueryBuilder |
clone()
Returns a copy of this query builder
|
List<String> |
getOptionalParameters()
Returns a list containing all optional parameters of the query builder
|
String |
getParameterValue(String name)
Retrieves the value assigned to a parameter of the query builder
|
String |
getQuery()
Retrieves the search query corresponding to the current state of the query builder
|
String |
getRawTemplate()
Returns the query template associated with this query builder
|
List<String> |
getRequiredParameters()
Returns a list containing all required parameters of the query builder
|
Integer |
getStartIndexDef()
Returns the default value of the StartIndex OpenSearch parameter associated with this query builder
|
Integer |
getStartPageDef()
Returns the default value of the StartPage OpenSearch parameter associated with this query builder
|
List<String> |
getUnsetParameters()
Returns a list containing all parameters to which no value has been assigned
|
boolean |
hasParameter(String name)
Determines if a parameter is contained in the parameter set of the query builder
|
boolean |
isParameterSet(String name)
Determines if a parameter has an assigned value.
|
boolean |
isQueryComplete()
Determines whether the query is complete and therefore ready to be issued, i.e.
|
QueryBuilder |
setParameter(String name,
Integer value)
Assigns an integral value to a parameter of the query builder
|
QueryBuilder |
setParameter(String name,
String value)
Assigns a string value to a parameter of the query builder
|
QueryBuilder |
setParameters(List<String> names,
List<Object> values)
Assigns to each parameter contained in the list of the first argument the respective value contained in the list of the secord argument
|
QueryBuilder |
setParameters(QueryElement queryEl)
Sets all parameters of the query builder that are also contained in the QueryElement provided with the values contained in the QueryElement
|
boolean hasParameter(String name)
name - The qualified name of the parameter to be checkedList<String> getRequiredParameters()
List<String> getOptionalParameters()
List<String> getUnsetParameters()
String getParameterValue(String name) throws NonExistentParameterException, Exception
name - The qualified name of the parameterNonExistentParameterException - If the parameter is not contained in the parameter set of the query builderException - In case of other errorQueryBuilder setParameter(String name, String value) throws NonExistentParameterException, Exception
name - The qualified name of the parametervalue - The value to be assigned to the parameterNonExistentParameterException - If the parameter is not contained in the parameter set of the query builderException - In case of other errorQueryBuilder setParameter(String name, Integer value) throws NonExistentParameterException, Exception
name - The qualified name of the parametervalue - The value to be assigned to the parameterNonExistentParameterException - If the parameter is not contained in the parameter set of the query builderException - In case of other errorQueryBuilder setParameters(List<String> names, List<Object> values) throws NonExistentParameterException, Exception
names - A list of parameter qualified namesvalues - A list of parameter values to be assigned to the respective parameterNonExistentParameterException - If a parameter of the list is not contained in the parameter of the query builderException - In case of other errorQueryBuilder setParameters(QueryElement queryEl) throws Exception
queryEl - The query element which will be used to assign values to the parameters of the query builderException - In case of errorboolean isParameterSet(String name)
name - The qualified name of the parameterInteger getStartIndexDef()
Integer getStartPageDef()
boolean isQueryComplete()
String getQuery() throws IncompleteQueryException, MalformedQueryException, Exception
IncompleteQueryException - If the query is not complete, i.e. there still exist unset required parametersMalformedQueryException - If the query is malformed, e.g. if a parameter value is not of the correct formException - In case of other errorString getRawTemplate()
QueryBuilder clone()
Copyright © 2014. All Rights Reserved.