|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface QueryBuilder
Interface of the query builder class that is used to construct OpenSearch queries using a query template
| Method Summary | |
|---|---|
QueryBuilder |
clone()
Returns a copy of this query builder |
java.util.List<java.lang.String> |
getOptionalParameters()
Returns a list containing all optional parameters of the query builder |
java.lang.String |
getParameterValue(java.lang.String name)
Retrieves the value assigned to a parameter of the query builder |
java.lang.String |
getQuery()
Retrieves the search query corresponding to the current state of the query builder |
java.lang.String |
getRawTemplate()
Returns the query template associated with this query builder |
java.util.List<java.lang.String> |
getRequiredParameters()
Returns a list containing all required parameters of the query builder |
java.lang.Integer |
getStartIndexDef()
Returns the default value of the StartIndex OpenSearch parameter associated with this query builder |
java.lang.Integer |
getStartPageDef()
Returns the default value of the StartPage OpenSearch parameter associated with this query builder |
java.util.List<java.lang.String> |
getUnsetParameters()
Returns a list containing all parameters to which no value has been assigned |
boolean |
hasParameter(java.lang.String name)
Determines if a parameter is contained in the parameter set of the query builder |
boolean |
isParameterSet(java.lang.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(java.lang.String name,
java.lang.Integer value)
Assigns an integral value to a parameter of the query builder |
QueryBuilder |
setParameter(java.lang.String name,
java.lang.String value)
Assigns a string value to a parameter of the query builder |
QueryBuilder |
setParameters(java.util.List<java.lang.String> names,
java.util.List<java.lang.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 |
| Method Detail |
|---|
boolean hasParameter(java.lang.String name)
name - The qualified name of the parameter to be checked
java.util.List<java.lang.String> getRequiredParameters()
java.util.List<java.lang.String> getOptionalParameters()
java.util.List<java.lang.String> getUnsetParameters()
java.lang.String getParameterValue(java.lang.String name)
throws NonExistentParameterException,
java.lang.Exception
name - The qualified name of the parameter
NonExistentParameterException - If the parameter is not contained in the parameter set of the query builder
java.lang.Exception - In case of other error
QueryBuilder setParameter(java.lang.String name,
java.lang.String value)
throws NonExistentParameterException,
java.lang.Exception
name - The qualified name of the parametervalue - The value to be assigned to the parameter
NonExistentParameterException - If the parameter is not contained in the parameter set of the query builder
java.lang.Exception - In case of other error
QueryBuilder setParameter(java.lang.String name,
java.lang.Integer value)
throws NonExistentParameterException,
java.lang.Exception
name - The qualified name of the parametervalue - The value to be assigned to the parameter
NonExistentParameterException - If the parameter is not contained in the parameter set of the query builder
java.lang.Exception - In case of other error
QueryBuilder setParameters(java.util.List<java.lang.String> names,
java.util.List<java.lang.Object> values)
throws NonExistentParameterException,
java.lang.Exception
names - A list of parameter qualified namesvalues - A list of parameter values to be assigned to the respective parameter
NonExistentParameterException - If a parameter of the list is not contained in the parameter of the query builder
java.lang.Exception - In case of other error
QueryBuilder setParameters(QueryElement queryEl)
throws java.lang.Exception
queryEl - The query element which will be used to assign values to the parameters of the query builder
java.lang.Exception - In case of errorboolean isParameterSet(java.lang.String name)
name - The qualified name of the parameter
java.lang.Integer getStartIndexDef()
java.lang.Integer getStartPageDef()
boolean isQueryComplete()
java.lang.String getQuery()
throws IncompleteQueryException,
MalformedQueryException,
java.lang.Exception
IncompleteQueryException - If the query is not complete, i.e. there still exist unset required parameters
MalformedQueryException - If the query is malformed, e.g. if a parameter value is not of the correct form
java.lang.Exception - In case of other errorjava.lang.String getRawTemplate()
QueryBuilder clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||