use of org.hibernate.sql.ast.spi.SqlExpressionResolver in project hibernate-orm by hibernate.
the class Any method applySqlSelections.
@Override
public void applySqlSelections(DomainResultCreationState creationState) {
final SqlAstCreationState sqlAstCreationState = creationState.getSqlAstCreationState();
final SqlExpressionResolver sqlExpressionResolver = sqlAstCreationState.getSqlExpressionResolver();
sqlExpressionResolver.resolveSqlSelection(this, type.getJdbcMappings().get(0).getJavaTypeDescriptor(), sqlAstCreationState.getCreationContext().getMappingMetamodel().getTypeConfiguration());
}
use of org.hibernate.sql.ast.spi.SqlExpressionResolver in project hibernate-orm by hibernate.
the class CaseSimpleExpression method applySqlSelections.
@Override
public void applySqlSelections(DomainResultCreationState creationState) {
final SqlAstCreationState sqlAstCreationState = creationState.getSqlAstCreationState();
final SqlExpressionResolver sqlExpressionResolver = sqlAstCreationState.getSqlExpressionResolver();
sqlExpressionResolver.resolveSqlSelection(this, type.getJdbcMappings().get(0).getJavaTypeDescriptor(), sqlAstCreationState.getCreationContext().getMappingMetamodel().getTypeConfiguration());
}
use of org.hibernate.sql.ast.spi.SqlExpressionResolver in project hibernate-orm by hibernate.
the class Every method applySqlSelections.
@Override
public void applySqlSelections(DomainResultCreationState creationState) {
final SqlAstCreationState sqlAstCreationState = creationState.getSqlAstCreationState();
final SqlExpressionResolver sqlExpressionResolver = sqlAstCreationState.getSqlExpressionResolver();
sqlExpressionResolver.resolveSqlSelection(this, type.getJdbcMappings().get(0).getJavaTypeDescriptor(), sqlAstCreationState.getCreationContext().getMappingMetamodel().getTypeConfiguration());
}
use of org.hibernate.sql.ast.spi.SqlExpressionResolver in project hibernate-orm by hibernate.
the class Duration method applySqlSelections.
@Override
public void applySqlSelections(DomainResultCreationState creationState) {
final SqlAstCreationState sqlAstCreationState = creationState.getSqlAstCreationState();
final SqlExpressionResolver sqlExpressionResolver = sqlAstCreationState.getSqlExpressionResolver();
sqlExpressionResolver.resolveSqlSelection(this, type.getJdbcMapping().getJavaTypeDescriptor(), sqlAstCreationState.getCreationContext().getMappingMetamodel().getTypeConfiguration());
}
use of org.hibernate.sql.ast.spi.SqlExpressionResolver in project hibernate-orm by hibernate.
the class QuerySpec method createDomainResult.
@Override
public DomainResult createDomainResult(String resultVariable, DomainResultCreationState creationState) {
TypeConfiguration typeConfiguration = creationState.getSqlAstCreationState().getCreationContext().getMappingMetamodel().getTypeConfiguration();
final SqlExpressionResolver sqlExpressionResolver = creationState.getSqlAstCreationState().getSqlExpressionResolver();
if (selectClause.getSqlSelections().size() == 1) {
SqlSelection first = selectClause.getSqlSelections().get(0);
JavaType descriptor = first.getExpressionType().getJdbcMappings().get(0).getJavaTypeDescriptor();
final SqlSelection sqlSelection = sqlExpressionResolver.resolveSqlSelection(this, descriptor, typeConfiguration);
return new BasicResult<>(sqlSelection.getValuesArrayPosition(), resultVariable, descriptor);
} else {
throw new UnsupportedOperationException("Domain result for non-scalar subquery shouldn't be created!");
}
}
Aggregations