code: @Override
      public Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName,
              Object columnValue, Class entityClazz)
      {
          List foreignKeys = new ArrayList();
          HttpResponse response = null;
          EntityMetadata m = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClazz);
          try
          {
              String q = "key=" + CouchDBUtils.appendQuotes(columnValue);
              URI uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(),
                      CouchDBConstants.URL_SEPARATOR + schemaName.toLowerCase() + CouchDBConstants.URL_SEPARATOR
                              + CouchDBConstants.DESIGN + tableName + CouchDBConstants.VIEW + columnName, q, null);
              HttpGet get = new HttpGet(uri);
              get.addHeader("Accept", "application/json");
              response = httpClient.execute(get);
  
              InputStream content = response.getEntity().getContent();
              Reader reader = new InputStreamReader(content);
              JsonObject json = gson.fromJson(reader, JsonObject.class);
  
              JsonElement jsonElement = json.get("rows");
              if (jsonElement == null)
              {
                  return foreignKeys.toArray();
              }
              JsonArray array = jsonElement.getAsJsonArray();
              for (JsonElement element : array)
              {
                  JsonElement value = element.getAsJsonObject().get("value").getAsJsonObject().get(pKeyName);
                  if (value != null)
                  {
                      foreignKeys.add(PropertyAccessorHelper.fromSourceToTargetClass(m.getIdAttribute()
                              .getBindableJavaType(), String.class, value.getAsString()));
                  }
              }
          }
          catch (Exception e)
          {
              log.error("Error while fetching ids for column where column name is" + columnName
                      + " and column value is {} , Caused by {}.", columnValue, e);
              throw new KunderaException(e);
          }
          finally
          {
              closeContent(response);
          }
          return foreignKeys.toArray();
      }
docs: /*
  (non-Javadoc)
  
  @see com.impetus.kundera.client.Client#findIdsByColumn(java.lang.String,
  java.lang.String, java.lang.String, java.lang.String, java.lang.Object,
  java.lang.Class)