Class JpaQueryExecution
java.lang.Object
org.springframework.data.jpa.repository.query.JpaQueryExecution
Set of classes to contain query execution strategies. Depending (mostly) on the return type of a
QueryMethod
a AbstractStringBasedJpaQuery
can be executed
in various flavors.- Author:
- Oliver Gierke, Thomas Darimont, Mark Paluch, Christoph Strobl, Nicolas Cirigliano, Jens Schauder, Gabriel Basilio, Greg Turnquist
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
doExecute
(AbstractJpaQuery query, JpaParametersParameterAccessor accessor) Method to implementAbstractStringBasedJpaQuery
executions by single enum values.execute
(AbstractJpaQuery query, JpaParametersParameterAccessor accessor) Executes the givenAbstractStringBasedJpaQuery
with the givenParameterBinder
.static void
potentiallyRemoveOptionalConverter
(ConfigurableConversionService conversionService) Removes the converter being able to convert any object into anOptional
from the givenConversionService
in case we're running on Java 8.
-
Constructor Details
-
JpaQueryExecution
public JpaQueryExecution()
-
-
Method Details
-
execute
Executes the givenAbstractStringBasedJpaQuery
with the givenParameterBinder
.- Parameters:
query
- must not be null.accessor
- must not be null.- Returns:
-
doExecute
@Nullable protected abstract Object doExecute(AbstractJpaQuery query, JpaParametersParameterAccessor accessor) Method to implementAbstractStringBasedJpaQuery
executions by single enum values.- Parameters:
query
- must not be null.accessor
- must not be null.
-
potentiallyRemoveOptionalConverter
public static void potentiallyRemoveOptionalConverter(ConfigurableConversionService conversionService) Removes the converter being able to convert any object into anOptional
from the givenConversionService
in case we're running on Java 8.- Parameters:
conversionService
- must not be null.
-