Interface ResultBuilder
- All Superinterfaces:
GraphNodeBuilder
- All Known Subinterfaces:
ResultBuilderBasicValued, ResultBuilderEntityValued, ResultBuilderInstantiationValued
- All Known Implementing Classes:
GeneratedValueBasicResultBuilder
@Incubating(since="8.0")
@SPI({USE,IMPLEMENT,SUPPLY})
public interface ResultBuilder
extends GraphNodeBuilder
Builds one DomainResult for a native-query result-set mapping.
Given select b from Book b join fetch b.authors, the result builder
produces the single Book(b) result. Implement this contract when a
provider needs a custom result shape, and register the instance through
ResultSetMapping.addResultBuilder(ResultBuilder).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionDomainResult<?> buildResult(JdbcValuesMetadata jdbcResultsMetadata, int resultPosition, DomainResultCreationState domainResultCreationState) Builds and supplies one domain result.Class<?> The Java type of the value returned for a result built by this builder.default voidvisitFetchBuilders(BiConsumer<Fetchable, FetchBuilder> consumer)
-
Method Details
-
buildResult
@SPI(SUPPLY) DomainResult<?> buildResult(JdbcValuesMetadata jdbcResultsMetadata, int resultPosition, DomainResultCreationState domainResultCreationState) Builds and supplies one domain result.- Parameters:
jdbcResultsMetadata- the JDBC values and metadataresultPosition- the position in the domain results for the result to be builtdomainResultCreationState- access to result-graph creation services- See Also:
-
getJavaType
-
cacheKeyInstance
ResultBuilder cacheKeyInstance() -
visitFetchBuilders
-