Package com.veeva.vault.sdk.api.query
Interface QueryExecutionRequest.Builder
- Enclosing interface:
- QueryExecutionRequest
public static interface QueryExecutionRequest.Builder
Creates an instance of
QueryExecutionRequest
. Calling at least one method to set
the query is required.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Retrieves the completedQueryExecutionRequest
.Sets the VQLQuery
, replacing any previously set Query or query string.Enables Query Describe on the query.withQueryFacetRequest
(QueryFacetRequest queryFacetRequest) Sets theQueryFacetRequest
, replacing any previously setQueryFacetRequest
.withQueryRecordPropertyTypes
(List<QueryRecordPropertyType> queryRecordPropertyTypes) Sets the requestedQueryRecordPropertyType
s, replacing any previously setQueryRecordPropertyType
s.withQueryString
(String queryString) Sets the VQL query string, replacing any previously set query string orQuery
.withTokenRequest
(TokenRequest tokenRequest, QueryEscapeOverride... escapeOverrides) Sets theTokenRequest
andQueryEscapeOverride
(s), replacing any previously setTokenRequest
andQueryEscapeOverride
(s).
-
Method Details
-
withQuery
Sets the VQLQuery
, replacing any previously set Query or query string.- Parameters:
query
- VQL query to be executed- Returns:
- this Builder
-
withQueryString
Sets the VQL query string, replacing any previously set query string orQuery
.- Parameters:
queryString
- VQL query string to be executed- Returns:
- this Builder
-
withTokenRequest
QueryExecutionRequest.Builder withTokenRequest(TokenRequest tokenRequest, QueryEscapeOverride... escapeOverrides) Sets theTokenRequest
andQueryEscapeOverride
(s), replacing any previously setTokenRequest
andQueryEscapeOverride
(s).Filters on a
String
field support tokens containing all the types listed inTokenRequest
except forList
. A filter using CONTAINS only supports a token containing aList
. All other fields support tokens containing either their type or aString
.Vault escapes all special VQL characters in
String
tokens if escape overrides are not provided.- Parameters:
tokenRequest
- a token request containing all custom tokens used in the queryescapeOverrides
- overrides(s) indicating which characters not to escape- Returns:
- this Builder
-
withQueryFacetRequest
Sets theQueryFacetRequest
, replacing any previously setQueryFacetRequest
.- Parameters:
queryFacetRequest
- a request containing the fields to facet on and options for running the facet query- Returns:
- this Builder
-
withQueryRecordPropertyTypes
QueryExecutionRequest.Builder withQueryRecordPropertyTypes(List<QueryRecordPropertyType> queryRecordPropertyTypes) Sets the requestedQueryRecordPropertyType
s, replacing any previously setQueryRecordPropertyType
s.Record properties contain additional record-level information and are only supported on Vault objects. Requesting record properties on a query has no effect when the query target does not support them, such as
documents
.- Parameters:
queryRecordPropertyTypes
- types of record properties to fetch- Returns:
- this Builder
-
withQueryDescribe
QueryExecutionRequest.Builder withQueryDescribe()Enables Query Describe on the query.- Returns:
- this Builder
-
build
QueryExecutionRequest build()Retrieves the completedQueryExecutionRequest
.The query must be non-null.
- Returns:
- the completed QueryExecutionRequest
-