@Override public List<T> execute(final Object... bindParameters) throws IOException { List<EncodedValue> encodedParameters = Arrays.asList(bindParameters).stream() .map(valueEncoder::encodeValue).collect(Collectors.toList());; Message request = Message.newBuilder().setOqlQueryRequest( OQLQueryRequest.newBuilder().addAllBindParameter(encodedParameters).setQuery(queryString)) .build(); final OQLQueryResponse response = channel.sendRequest(request, MessageTypeCase.OQLQUERYRESPONSE).getOqlQueryResponse(); switch (response.getResultCase()) { case SINGLERESULT: return (List<T>) parseSingleResult(response); case LISTRESULT: return parseListResult(response); case TABLERESULT: return (List<T>) parseTableResult(response); default: throw new RuntimeException("Unexpected response: " + response); } }
result = result && getResultCase().equals( other.getResultCase()); if (!result) return false; switch (resultCase_) {
public Builder mergeFrom(org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.OQLQueryResponse other) { if (other == org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.OQLQueryResponse.getDefaultInstance()) return this; switch (other.getResultCase()) { case SINGLERESULT: { mergeSingleResult(other.getSingleResult()); break; } case LISTRESULT: { mergeListResult(other.getListResult()); break; } case TABLERESULT: { mergeTableResult(other.getTableResult()); break; } case RESULT_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }