code: @Override
      public void delete(Object entity, Object pKey)
      {
          HttpResponse response = null;
          try
          {
              EntityMetadata entityMetadata = KunderaMetadataManager
                      .getEntityMetadata(kunderaMetadata, entity.getClass());
              MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                      entityMetadata.getPersistenceUnit());
              String _id = null;
              if (metaModel.isEmbeddable(entityMetadata.getIdAttribute().getBindableJavaType()))
              {
                  Field field = (Field) entityMetadata.getIdAttribute().getJavaMember();
                  EmbeddableType embeddableType = metaModel.embeddable(entityMetadata.getIdAttribute()
                          .getBindableJavaType());
                  _id = CouchDBObjectMapper.get_Id(field, pKey, embeddableType, entityMetadata.getTableName());
              }
              else
              {
                  _id = entityMetadata.getTableName() + PropertyAccessorHelper.getString(pKey);
              }
              URI uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(),
                      CouchDBConstants.URL_SEPARATOR + entityMetadata.getSchema().toLowerCase()
                              + CouchDBConstants.URL_SEPARATOR + _id, null, null);
              HttpGet get = new HttpGet(uri);
              get.addHeader("Accept", "application/json");
              response = httpClient.execute(get);
  
              Reader reader = new InputStreamReader(response.getEntity().getContent());
              JsonObject json = gson.fromJson(reader, JsonObject.class);
              closeContent(response);
              if (!(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND))
              {
                  onDelete(entityMetadata.getSchema(), _id, response, json);
              }
          }
          catch (Exception e)
          {
              log.error("Error while deleting object, Caused by {}.", e);
              throw new KunderaException(e);
          }
          finally
          {
              closeContent(response);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see com.impetus.kundera.client.Client#delete(java.lang.Object,
  java.lang.Object)