Package stroom.query.api.v2
Class Query.Builder
- java.lang.Object
-
- stroom.query.api.v2.Query.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description Query.BuilderaddParam(java.lang.String key, java.lang.String value)Shortcut function to add a parameter and go straight back to building the queryQuery.BuilderaddParams(Param... values)Querybuild()Query.BuilderdataSource(java.lang.String type, java.lang.String uuid, java.lang.String name)Shortcut function for creating the datasourceDocRefin one goQuery.BuilderdataSource(DocRef value)Query.Builderexpression(ExpressionOperator value)
-
-
-
Method Detail
-
dataSource
public Query.Builder dataSource(DocRef value)
- Parameters:
value- A DocRef that points to the data source of the query- Returns:
- The
Query.Builder, enabling method chaining
-
dataSource
public Query.Builder dataSource(java.lang.String type, java.lang.String uuid, java.lang.String name)
Shortcut function for creating the datasourceDocRefin one go- Parameters:
type- The type of the datasourceuuid- The UUID of the datasourcename- The name of the datasource- Returns:
- this builder, with the completed datasource added.
-
expression
public Query.Builder expression(ExpressionOperator value)
- Parameters:
value- he root logical addOperator in the query expression tree- Returns:
- The
Query.Builder, enabling method chaining
-
addParam
public Query.Builder addParam(java.lang.String key, java.lang.String value)
Shortcut function to add a parameter and go straight back to building the query- Parameters:
key- The parameter keyvalue- The parameter value- Returns:
- this builder with the completed parameter added.
-
addParams
public Query.Builder addParams(Param... values)
- Parameters:
values- A list of key/value pairs that provide additional information about the query- Returns:
- The
Query.Builder, enabling method chaining
-
build
public Query build()
-
-