public class SRUQueryBuilder extends QueryBuilderDecorator
qb| Constructor and Description |
|---|
SRUQueryBuilder(QueryBuilder qb) |
| Modifier and Type | Method and Description |
|---|---|
QueryBuilder |
clone()
Returns a copy of this query builder
|
String |
getQuery()
Retrieves the search query corresponding to the current state of the query builder
|
static void |
main(String[] args) |
SRUQueryBuilder |
setParameter(String name,
String value)
Assigns a string value to a parameter of the query builder
|
SRUQueryBuilder |
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
|
getOptionalParameters, getParameterValue, getRawTemplate, getRequiredParameters, getStartIndexDef, getStartPageDef, getUnsetParameters, hasParameter, isParameterSet, isQueryComplete, setParameterpublic SRUQueryBuilder(QueryBuilder qb) throws Exception
Exceptionpublic QueryBuilder clone()
QueryBuilderclone in interface QueryBuilderclone in class QueryBuilderDecoratorpublic SRUQueryBuilder setParameter(String name, String value) throws NonExistentParameterException, Exception
setParameter in interface QueryBuildersetParameter in class QueryBuilderDecoratorname - 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, String)public SRUQueryBuilder setParameters(List<String> names, List<Object> values) throws NonExistentParameterException, Exception
setParameters in interface QueryBuildersetParameters in class QueryBuilderDecoratornames - 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(List, List)public String getQuery() throws IncompleteQueryException, MalformedQueryException, Exception
getQuery in interface QueryBuildergetQuery in class QueryBuilderDecoratorIncompleteQueryException - 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 errorQueryBuilder.getQuery()public QueryBuilder setParameters(QueryElement queryEl) throws NonExistentParameterException, Exception
setParameters in interface QueryBuildersetParameters in class QueryBuilderDecoratorqueryEl - The query element which will be used to assign values to the parameters of the query builderException - In case of errorNonExistentParameterExceptionQueryBuilder.setParameters(QueryElement)Copyright © 2014. All Rights Reserved.