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));
}
Aggregations