Spring Data for VMware GemFire
Interface OqlQueryExecutor
- All Known Implementing Classes:
TemplateBasedOqlQueryExecutor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A Strategy interface for executing Apache Geode OQL queries (e.g. SELECT statements).
- Since:
- 2.4.0
- See Also:
-
SelectResultsQueryMethod
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.geode.cache.query.SelectResultsexecute(org.springframework.data.repository.query.QueryMethod queryMethod, String query, Object... arguments) Executes the givenOQL query.Constructs a new instance ofUnsupportedQueryExecutionExceptioninitialized with a canned message containing the given OQL query that could not be executed by theOqlQueryExecutorimplementation.default OqlQueryExecutorthenExecuteWith(OqlQueryExecutor queryExecutor) Null-safe composition method to compose thisOqlQueryExecutorwith the givenOqlQueryExecutor.
-
Field Details
-
NON_EXECUTABLE_QUERY_MESSAGE
- See Also:
-
-
Method Details
-
execute
org.apache.geode.cache.query.SelectResults execute(org.springframework.data.repository.query.QueryMethod queryMethod, String query, Object... arguments) Executes the givenOQL query.- Parameters:
queryMethod-QueryMethodmodeling the OQl query.query-Stringcontaining the Apache Geode OQL query.arguments- array ofargumentsused for the bind in OQL query parameters.- Returns:
- the
OQL query result set. - Throws:
UnsupportedQueryExecutionException- if thisOqlQueryExecutorcannot execute (i.e. handle) the OQL query.- See Also:
-
QueryMethodSelectResults
-
newUnsupportedQueryExecutionException
Constructs a new instance ofUnsupportedQueryExecutionExceptioninitialized with a canned message containing the given OQL query that could not be executed by theOqlQueryExecutorimplementation.- Parameters:
query-OQL querythat could not be executed.- Returns:
- a new
UnsupportedQueryExecutionException. - See Also:
-
thenExecuteWith
Null-safe composition method to compose thisOqlQueryExecutorwith the givenOqlQueryExecutor.OqlQueryExecutorimplementations should be composed in an order that is most suitable to the execution of the OQL query first. Meaning, the outer mostOqlQueryExecutorshould be the most suitableOqlQueryExecutorto execute the given OQL query followed by the next most suitableOqlQueryExecutorin the composition (i.e. chain) and so on until the OQL query is either successfully executed (handled) or the composition is exhausted, in which case, anExceptioncould be thrown. If anis unable to execute, or handle, the given OQL query, then it must throw an {@link UnsupportedQueryExecutionException } to triggger the next {@link OqlQueryExecutor} in the composition.- Parameters:
queryExecutor-OqlQueryExecutorto compose with thisOqlQueryExecutor; must not be null.- Returns:
- a composed
OqlQueryExecutorconsisting of thisOqlQueryExecutorcomposed with the givenOqlQueryExecutor. If theOqlQueryExecutoris null, then this method returns thisOqlQueryExecutor. - See Also:
-