Search in sources :

Example 1 with RelationalParameterAccessor

use of org.springframework.data.relational.repository.query.RelationalParameterAccessor in project spring-data-jdbc by spring-projects.

the class StringBasedJdbcQuery method execute.

/*
	 * (non-Javadoc)
	 * @see org.springframework.data.repository.query.RepositoryQuery#execute(java.lang.Object[])
	 */
@Override
public Object execute(Object[] objects) {
    RelationalParameterAccessor accessor = new RelationalParametersParameterAccessor(getQueryMethod(), objects);
    ResultProcessor processor = getQueryMethod().getResultProcessor().withDynamicProjection(accessor);
    ResultProcessingConverter converter = new ResultProcessingConverter(processor, this.converter.getMappingContext(), this.converter.getEntityInstantiators());
    RowMapper<Object> rowMapper = determineRowMapper(rowMapperFactory.create(resolveTypeToRead(processor)), converter, accessor.findDynamicProjection() != null);
    JdbcQueryExecution<?> queryExecution = getQueryExecution(// 
    queryMethod, // 
    determineResultSetExtractor(rowMapper), rowMapper);
    return queryExecution.execute(determineQuery(), this.bindParameters(accessor));
}
Also used : RelationalParametersParameterAccessor(org.springframework.data.relational.repository.query.RelationalParametersParameterAccessor) RelationalParameterAccessor(org.springframework.data.relational.repository.query.RelationalParameterAccessor) ResultProcessor(org.springframework.data.repository.query.ResultProcessor)

Aggregations

RelationalParameterAccessor (org.springframework.data.relational.repository.query.RelationalParameterAccessor)1 RelationalParametersParameterAccessor (org.springframework.data.relational.repository.query.RelationalParametersParameterAccessor)1 ResultProcessor (org.springframework.data.repository.query.ResultProcessor)1