Java 类org.springframework.data.repository.query.ResultProcessor 实例源码

项目:spring-data-documentdb    文件:AbstractDocumentDbQuery.java   
public Object execute(Object[] parameters) {
    final DocumentDbParameterAccessor accessor = new DocumentDbParameterParameterAccessor(method, parameters);
    final Query query = createQuery(accessor);

    final ResultProcessor processor = method.getResultProcessor().withDynamicProjection(accessor);
    final String collection = ((DocumentDbEntityMetadata) method.getEntityInformation()).getCollectionName();

    final DocumentDbQueryExecution execution = getExecution(query, accessor);
    return execution.execute(query, processor.getReturnedType().getDomainType(), collection);
}
项目:spring-data-snowdrop    文件:AbstractSnowdropRepositoryQuery.java   
@Override
public Object execute(Object[] parameters) {
    ParametersParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), parameters);
    ResultProcessor resultProcessor = getQueryMethod().getResultProcessor().withDynamicProjection(accessor);
    Object source = executeInternal(accessor);
    return resultProcessor.processResult(source);
}
项目:spring-data-objectify    文件:ObjectifyRepositoryQuery.java   
@Override
public Object execute(Object[] parameters) {
    ParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), parameters);
    ResultProcessor processor = queryMethod.getResultProcessor().withDynamicProjection(accessor);

    return processor.processResult(doExecute(parameters));
}
项目:spring-data-ebean    文件:AbstractStringBasedEbeanQuery.java   
/**
 * Creates an appropriate Ebean query from an {@link EbeanServer} according to the current {@link AbstractEbeanQuery}
 * type.
 *
 * @param queryString
 * @return
 */
protected Object createEbeanQuery(String queryString) {
  EbeanServer ebeanServer = getEbeanServer();

  ResultProcessor resultFactory = getQueryMethod().getResultProcessor();
  ReturnedType returnedType = resultFactory.getReturnedType();

  return ebeanServer.createQuery(returnedType.getReturnedType(), queryString);
}
项目:spring-data-ebean    文件:PartTreeEbeanQuery.java   
protected EbeanQueryCreator createCreator(ParametersParameterAccessor accessor) {
  EbeanServer ebeanServer = getEbeanServer();
  Query ebeanQuery = ebeanServer.createQuery(domainClass);
  ExpressionList expressionList = ebeanQuery.where();

  ParameterMetadataProvider provider = new ParameterMetadataProvider(accessor);

  ResultProcessor processor = getQueryMethod().getResultProcessor();

  return new EbeanQueryCreator(tree, processor.getReturnedType(), expressionList, provider);
}
项目:spring-data-ebean    文件:NativeEbeanQuery.java   
@Override
protected Object createEbeanQuery(String queryString) {
  ResultProcessor resultFactory = getQueryMethod().getResultProcessor();
  ReturnedType returnedType = resultFactory.getReturnedType();

  return getEbeanServer().findNative(returnedType.getReturnedType(), queryString);
}
项目:spring-data-keyvalue    文件:KeyValuePartTreeQuery.java   
@Override
public Object execute(Object[] parameters) {

    ParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), parameters);
    KeyValueQuery<?> query = prepareQuery(parameters);
    ResultProcessor processor = queryMethod.getResultProcessor().withDynamicProjection(accessor);

    return processor.processResult(doExecute(parameters, query));
}
项目:spring-data-mybatis    文件:AbstractMybatisQuery.java   
private Object doExecute(MybatisQueryExecution execution, Object[] parameters) {

        Object result = execution.execute(this, parameters);

        ParametersParameterAccessor accessor = new ParametersParameterAccessor(method.getParameters(), parameters);
        ResultProcessor withDynamicProjection = method.getResultProcessor().withDynamicProjection(accessor);

        return withDynamicProjection.processResult(result, new TupleConverter(withDynamicProjection.getReturnedType()));
    }