use of org.hibernate.query.results.FromClauseAccessImpl in project hibernate-orm by hibernate.
the class CompleteResultBuilderCollectionStandard method buildResult.
@Override
public DomainResult<?> buildResult(JdbcValuesMetadata jdbcResultsMetadata, int resultPosition, BiFunction<String, String, DynamicFetchBuilderLegacy> legacyFetchResolver, DomainResultCreationState domainResultCreationState) {
final DomainResultCreationStateImpl creationStateImpl = impl(domainResultCreationState);
final SessionFactoryImplementor sessionFactory = creationStateImpl.getSessionFactory();
final FromClauseAccessImpl fromClauseAccess = creationStateImpl.getFromClauseAccess();
final TableGroup rootTableGroup = pluralAttributeDescriptor.createRootTableGroup(false, navigablePath, tableAlias, null, new SqlAliasBaseConstant(tableAlias), creationStateImpl.getSqlExpressionResolver(), creationStateImpl.getFromClauseAccess(), sessionFactory);
fromClauseAccess.registerTableGroup(navigablePath, rootTableGroup);
resolveSelections(rootTableGroup, pluralAttributeDescriptor.getKeyDescriptor(), keyColumnNames, jdbcResultsMetadata, creationStateImpl);
if (pluralAttributeDescriptor.getIndexDescriptor() != null) {
resolveSelections(rootTableGroup, pluralAttributeDescriptor.getIndexDescriptor(), indexColumnNames, jdbcResultsMetadata, creationStateImpl);
}
resolveSelections(rootTableGroup, pluralAttributeDescriptor.getElementDescriptor(), elementColumnNames, jdbcResultsMetadata, creationStateImpl);
return pluralAttributeDescriptor.createDomainResult(navigablePath, rootTableGroup, null, domainResultCreationState);
}
Aggregations