/* (non-Javadoc)
@see org.apache.hadoop.contrib.index.mapred.IDistributionPolicy#chooseShardForDelete(org.apache.hadoop.contrib.index.mapred.DocumentID)
166748
public int chooseShardForDelete(DocumentID key) {
    int hashCode = key.hashCode();
    return hashCode >= 0 ? hashCode % numShards : (-hashCode) % numShards;
  }
1207496
@Override
    public void deleteById(ID id) {
        Assert.notNull(id, "id to be deleted should not be null");

        operation.deleteById(information.getCollectionName(), id, null);
    }
876590
public static void tearDownExample(XMLDocumentManager docMgr, String docId, String webserviceId, String newId) {
    docMgr.delete(docId);
    docMgr.delete(webserviceId);
    docMgr.delete(newId);
  }
348349
public void delete(final boolean hardDelete) {
        if (hardDelete) {
            this.state = StreamState.HARD_DELETED.dbValue();
        } else {
            this.state = StreamState.SOFT_DELETED.dbValue();
        }
    }
1186017
@Override
  public Task<Void> deleteApiKey(@NonNull final ObjectId id) {
    return dispatcher.dispatchTask(new Callable<Void>() {
      @Override
      public Void call() {
        deleteApiKeyInternal(id);
        return null;
      }
    });
  }
863370
@Override
	public void removeByCPDefinitionOptionRelId(long CPDefinitionOptionRelId) {
		for (CPDefinitionOptionValueRel cpDefinitionOptionValueRel : findByCPDefinitionOptionRelId(
				CPDefinitionOptionRelId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
				null)) {
			remove(cpDefinitionOptionValueRel);
		}
	}
360661
public boolean removeDoc(String collName, String docId) {
        if (mCollections.containsKey(collName)) {
            // remove IDs from collection
            Map<String, Map<String,Object>> collection = mCollections.get(collName);
            if (BuildConfig.DEBUG) {
                log.debug("Removed doc: " + docId);
            }
            collection.remove(docId);
            return true;
        } else {
            log.warn("Received invalid removed msg for collection "
                    + collName);
            return false;
        }
    }
282285
@Deprecated
    public void deleteRelation(Integer id) throws RedmineException {
        new IssueRelation(transport).setId(id).delete();
    }
835260
@Nonnull
  public ApiFuture<WriteResult> delete(@Nonnull Precondition options) {
    WriteBatch writeBatch = firestore.batch();
    return extractFirst(writeBatch.delete(this, options).commit());
  }
181097
@Nonnull
  public T delete(@Nonnull DocumentReference documentReference) {
    return performDelete(documentReference, Precondition.NONE);
  }
462303
@Override
    public Delete createDelete(URI id, String tableName) throws IOException {
        Delete del = null;
        HTable hTable = getTable(tableName);
        if (hTable != null) {
            del = new Delete(Bytes.toBytes(id.toString()));
        }
        return del;
    }
520656
private void setC4Document(C4Document c4doc) {
        synchronized (lock) {
            replaceC4Document(c4doc);
            data = null;
            if (c4doc != null && !c4doc.deleted()) { data = c4doc.getSelectedBody2(); }
            updateDictionary();
        }
    }
878953
@Override
	public Mono<Void> deleteById(String id) {

		return findSession(id)
				.flatMap(document -> this.mongoOperations.remove(document, this.collectionName).then(Mono.just(document)))
				.map(document -> convertToSession(this.mongoSessionConverter, document))
				.doOnSuccess(mongoSession -> publishEvent(new SessionDeletedEvent(this, mongoSession))) //
				.then();
	}
329231
public static void setId(Object document, String id) {
		DocumentAccessor d = getAccessor(document);
		if (d.hasIdMutator()) {
			d.setId(document, id);
		}
	}
431678
@Override
	public void remove(String oid) throws IndexerException {
		log.debug("Deleting " + oid + " from index");
		try {
			solr.deleteByQuery("storage_id:\"" + oid + "\"");
			solr.commit();
		} catch (SolrServerException sse) {
			throw new IndexerException(sse);
		} catch (IOException ioe) {
			throw new IndexerException(ioe);
		}
	}
76572
private DocumentChange deleteDoc(QueryDocumentSnapshot oldDocument) {
    ResourcePath resourcePath = oldDocument.getReference().getResourcePath();
    int oldIndex = documentSet.indexOf(resourcePath);
    documentSet = documentSet.remove(resourcePath);
    return new DocumentChange(oldDocument, Type.REMOVED, oldIndex, -1);
  }
785159
@Override
  public final <T> void deleteEntity(
    final Map<String, Object> pAddParam,
      final T pEntity) throws Exception {
    pAddParam.put("isOnlyId", Boolean.TRUE);
    ColumnsValues columnsValues = evalColumnsValues(pAddParam, pEntity);
    pAddParam.remove("isOnlyId");
    String whereId = evalWhereId(pEntity, columnsValues);
    getSrvDatabase().executeDelete(pEntity.getClass()
      .getSimpleName().toUpperCase(), whereId);
  }