Package com.apitrary.api.response

Examples of com.apitrary.api.response.QueriedGetResponse


    log.debug("Searching " + entity + " " + riakQuery);

    QueriedGetRequest request = new QueriedGetRequest();
    request.setEntity(resolveApitraryEntity(entity));
    request.setQuery(riakQuery);
    QueriedGetResponse response = resolveApitraryClient().send(request);

    return (List<T>) new QueriedGetResponseUnmarshaller(this).unMarshall(response, entity);
  }
View Full Code Here


    log.debug("Loading all " + entity);

    QueriedGetRequest request = new QueriedGetRequest();
    request.setEntity(resolveApitraryEntity(entity));
    QueriedGetResponse response = resolveApitraryClient().send(request);

    if (HttpStatus.OK.ordinal() == response.getStatusCode()) {
      return (List<T>) new QueriedGetResponseUnmarshaller(this).unMarshall(response, entity);
    } else {
      /*
       * happens more often than expected...
       */
      // if(HttpStatus.Internal_Server_Error.ordinal() ==
      // response.getStatusCode()){
      // throw new
      // CommunicationErrorException(HttpStatus.Internal_Server_Error);
      // }
      throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()));
    }
  }
View Full Code Here

    log.debug("Searching " + entity.getName() + " " + riakQuery);

    QueriedGetRequest request = new QueriedGetRequest();
    request.setEntity(resolveApitraryEntity(entity));
    request.setQuery(riakQuery);
    QueriedGetResponse response = resolveApitraryClient().send(request);

    return (List<T>) new QueriedGetResponseUnmarshaller(this).unMarshall(response, entity);
  }
View Full Code Here

    log.debug("Searching " + entity.getName() + " " + query);

    QueriedGetRequest request = new QueriedGetRequest();
    request.setEntity(resolveApitraryEntity(entity));
    request.setQuery(query.toString());
    QueriedGetResponse response = resolveApitraryClient().send(request);

    return (List<T>) new QueriedGetResponseUnmarshaller(this).unMarshall(response, entity);
  }
View Full Code Here

    log.debug("Loading all " + entity.getName());

    QueriedGetRequest request = new QueriedGetRequest();
    request.setEntity(resolveApitraryEntity(entity));
    QueriedGetResponse response = resolveApitraryClient().send(request);

    if (HttpStatus.OK.ordinal() == response.getStatusCode()) {
      return (List<T>) new QueriedGetResponseUnmarshaller(this).unMarshall(response, entity);
    } else {
      /*
       * happens more often than expected...
       */
      // if(HttpStatus.Internal_Server_Error.ordinal() ==
      // response.getStatusCode()){
      // throw new
      // CommunicationErrorException(HttpStatus.Internal_Server_Error);
      // }
      throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()), response.getResult());
    }
  }
View Full Code Here

TOP

Related Classes of com.apitrary.api.response.QueriedGetResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.