Class QueryExecutionConverters
java.lang.Object
org.springframework.data.repository.util.QueryExecutionConverters
Converters to potentially wrap the execution of a repository method into a variety of wrapper types potentially being
 available on the classpath. Currently supported:
 
- java.util.concurrent.Future
- java.util.concurrent.CompletableFuture
- org.springframework.util.concurrent.ListenableFuture<
- javaslang.collection.Seq,- javaslang.collection.Map,- javaslang.collection.Set- as of 1.13
- io.vavr.collection.Seq,- io.vavr.collection.Map,- io.vavr.collection.Set- as of 2.0
- Reactive wrappers supported by ReactiveWrappers- as of 2.0
- Since:
- 1.8
- Author:
- Oliver Gierke, Mark Paluch, Christoph Strobl, Maciek Opała, Jens Schauder
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic final class
- 
Method SummaryModifier and TypeMethodDescriptionReturns the types that are supported on paginating query methods.getExecutionAdapter(Class<?> returnType) Returns theQueryExecutionConverters.ExecutionAdapterto be used for the given return type.static booleanisSingleValue(Class<?> type) static voidregisterConvertersIn(ConfigurableConversionService conversionService) Registers converters for wrapper types found on the classpath.static booleanReturns whether the given type is a supported wrapper type.static booleansupportsUnwrapping(Class<?> type) Returns whether the given wrapper type supports unwrapping.static ObjectUnwraps the given source value in case it's one of the currently supported wrapper types detected at runtime.static TypeInformation<?>unwrapWrapperTypes(TypeInformation<?> type) Recursively unwraps well known wrapper types from the givenTypeInformation.static TypeInformation<?>unwrapWrapperTypes(TypeInformation<?> type, TypeInformation<?> reference) Recursively unwraps well known wrapper types from the givenTypeInformationbut aborts at the given reference type.
- 
Method Details- 
supportsReturns whether the given type is a supported wrapper type.- Parameters:
- type- must not be null.
- Returns:
 
- 
supportsUnwrappingReturns whether the given wrapper type supports unwrapping.- Parameters:
- type- must not be null.
- Returns:
 
- 
isSingleValue
- 
getAllowedPageableTypesReturns the types that are supported on paginating query methods. Will include custom collection types of e.g. Vavr.- Returns:
 
- 
registerConvertersInRegisters converters for wrapper types found on the classpath.- Parameters:
- conversionService- must not be null.
 
- 
unwrapUnwraps the given source value in case it's one of the currently supported wrapper types detected at runtime.- Parameters:
- source- can be null.
- Returns:
 
- 
unwrapWrapperTypespublic static TypeInformation<?> unwrapWrapperTypes(TypeInformation<?> type, TypeInformation<?> reference) Recursively unwraps well known wrapper types from the givenTypeInformationbut aborts at the given reference type.- Parameters:
- type- must not be null.
- reference- must not be null.
- Returns:
- will never be null.
 
- 
unwrapWrapperTypesRecursively unwraps well known wrapper types from the givenTypeInformation.- Parameters:
- type- must not be null.
- Returns:
- will never be null.
 
- 
getExecutionAdapter@Nullable public static QueryExecutionConverters.ExecutionAdapter getExecutionAdapter(Class<?> returnType) Returns theQueryExecutionConverters.ExecutionAdapterto be used for the given return type.- Parameters:
- returnType- must not be null.
- Returns:
- can be null.
 
 
-