public abstract class Query<QueryT extends Query<QueryT,QueryResultT>,QueryResultT extends QueryResult<QueryT,QueryResultT>> extends Object
Modifier | Constructor and Description |
---|---|
protected |
Query() |
Modifier and Type | Method and Description |
---|---|
QueryResultT |
execute()
Executes a given query using the default
ErpConfigContext . |
abstract QueryResultT |
execute(ErpConfigContext configContext)
Executes a given query using the given
ErpConfigContext . |
abstract String |
getConstructedByMethod() |
Duration |
getLongRunningRequestThreshold()
Custom execution duration threshold indicating that the query is long running.
|
String |
getReadAccessData() |
long |
getRequestId()
Represents an identifier that allows to correlate queries between the Cloud cloudplatform and the ERP.
|
void |
setLongRunningRequestThreshold(Duration longRunningRequestThreshold)
Custom execution duration threshold indicating that the query is long running.
|
@Nonnull public abstract String getConstructedByMethod()
@Nullable public String getReadAccessData()
@Nonnull public abstract QueryResultT execute(@Nonnull ErpConfigContext configContext) throws QuerySerializationException, QueryExecutionException, DestinationNotFoundException, DestinationAccessException
ErpConfigContext
.configContext
- The ErpConfigContext
to be used for query execution.QuerySerializationException
- If there is an issue while serializing the query.QueryExecutionException
- If there is an issue while executing the query.DestinationNotFoundException
- If no destination with the name specified in the ErpConfigContext
can be found.DestinationAccessException
- If there is an issue while accessing destination information.@Nonnull public QueryResultT execute() throws QuerySerializationException, QueryExecutionException, DestinationNotFoundException, DestinationAccessException
ErpConfigContext
. The default ErpConfigContext
can be
instantiated with new ErpConfigContext()
.QuerySerializationException
- If there is an issue while serializing the query.QueryExecutionException
- If there is an issue while executing the query.DestinationNotFoundException
- If no destination with the name specified in the ErpConfigContext
can be found.DestinationAccessException
- If there is an issue while accessing destination information.public long getRequestId()
Important: The identifier does not provide any guarantees with respect to persistence across the application lifecycle. In particular, the identifier will be reset to 1 when restarting the application.
@Nullable public Duration getLongRunningRequestThreshold()
Copyright © 2018 SAP SE. All rights reserved.