Search in sources :

Example 1 with DynamicInstantiationResultImpl

use of org.hibernate.sql.results.graph.instantiation.internal.DynamicInstantiationResultImpl in project hibernate-orm by hibernate.

the class CompleteResultBuilderInstantiation method buildResult.

@Override
public DomainResult<?> buildResult(JdbcValuesMetadata jdbcResultsMetadata, int resultPosition, BiFunction<String, String, DynamicFetchBuilderLegacy> legacyFetchResolver, DomainResultCreationState domainResultCreationState) {
    final List<ArgumentDomainResult<?>> argumentDomainResults = new ArrayList<>(argumentResultBuilders.size());
    for (int i = 0; i < argumentResultBuilders.size(); i++) {
        final ResultBuilder argumentResultBuilder = argumentResultBuilders.get(i);
        @SuppressWarnings({ "unchecked", "rawtypes" }) final ArgumentDomainResult<?> argumentDomainResult = new ArgumentDomainResult(argumentResultBuilder.buildResult(jdbcResultsMetadata, i, legacyFetchResolver, domainResultCreationState));
        argumentDomainResults.add(argumentDomainResult);
    }
    return new DynamicInstantiationResultImpl<>(null, DynamicInstantiationNature.CLASS, javaType, argumentDomainResults);
}
Also used : ResultBuilder(org.hibernate.query.results.ResultBuilder) DynamicInstantiationResultImpl(org.hibernate.sql.results.graph.instantiation.internal.DynamicInstantiationResultImpl) ArgumentDomainResult(org.hibernate.sql.results.graph.instantiation.internal.ArgumentDomainResult) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 ResultBuilder (org.hibernate.query.results.ResultBuilder)1 ArgumentDomainResult (org.hibernate.sql.results.graph.instantiation.internal.ArgumentDomainResult)1 DynamicInstantiationResultImpl (org.hibernate.sql.results.graph.instantiation.internal.DynamicInstantiationResultImpl)1