delete multiple Model

@param idCollection model id collection
@param permanent    a boolean.
@return if true delete from physical device, if logical delete return false, response status 202
@throws java.lang.Exception if any.
354350
protected boolean deleteMultipleModel(Set<MODEL_ID> idCollection, boolean permanent) throws Exception {
        if (permanent) {
            server.deleteAllPermanent(modelType, idCollection);
        } else {
            server.deleteAll(modelType, idCollection);
        }
        return permanent;
    }
659969
def delete(self, request, _id):
        
        _id = deserialize(_id)

        to_delete = self.collection.get({'_id': _id})
        if to_delete:
            deleted = to_delete.delete()

            return Response(
                response=serialize(deleted),
                status=(
                    200 if not all(
                        key in deleted for key in [
                            'error_code', 'error_type', 'error_message'
                        ]
                    ) else 400
                )
            )
        else:
            return Response(
                response=serialize(
                    DocumentNotFoundError(self.collection.__name__, _id)
                ),
                status=404
            )
53922
public int deleteObjects(DatabaseConnection databaseConnection, Collection<T> datas, ObjectCache objectCache)
			throws SQLException {
		// have to build this on the fly because the collection has variable number of args
		int result = MappedDeleteCollection.deleteObjects(dao, tableInfo, databaseConnection, datas, objectCache);
		if (dao != null && !localIsInBatchMode.get()) {
			dao.notifyChanges();
		}
		return result;
	}
272079
public function drop($collection, array $options = [])
    {
        $collectionName = $this->getCollectionName($collection);

        if ($this->isValidCollectionId($collectionName)) {
            throw new ClientException('Cannot alter a collection without a collection id');
        }

        $appendix = '';
        if (is_array($options) && isset($options['isSystem'])) {
            $appendix = '?isSystem=' . UrlHelper::getBoolString($options['isSystem']);
        }

        $this->getConnection()->delete(UrlHelper::buildUrl(Urls::URL_COLLECTION, [$collectionName]) . $appendix);

        return true;
    }
516737
public function delete(SmartCollection $smartCollection)
    {
        $request = $this->createRequest('/admin/smart_collections/'.$smartCollection->getId().'.json', static::REQUEST_METHOD_DELETE);
        $this->send($request);
    }
388521
@Override
    public Collection<Bean> delete(String schemaName, Collection<String> instanceIds)
            throws AbortRuntimeException {
        init();
        Map<BeanId, Bean> deleted = list(schemaName, instanceIds);
        Set<HBeanRow> rows = new HashSet<>();
        for (String id : instanceIds) {
            rows.add(new HBeanRow(BeanId.create(id, schemaName), uids));
        }
        try {
            rows = table.getEager(rows).getRows();
            ArrayList<BeanId> predecessors = new ArrayList<>();
            for (HBeanRow row : rows) {
                for (BeanId id : row.getPredecessorsBeanIds()) {
                    predecessors.add(id);
                }
            }
            if (predecessors.size() > 0) {
                throw Events.CFG302_CANNOT_DELETE_BEAN(predecessors);
            }
        } catch (HBeanNotFoundException e) {
            throw Events.CFG304_BEAN_DOESNT_EXIST(e.getNotFound().iterator().next());
        }
        table.delete(rows);
        return deleted.values();
    }
357571
public function deleteID($ID)
    {
        if($this->offsetExists($this->safeOffset($ID))) {
            $this->offsetUnset($this->safeOffset($ID));
        } else {
            throw new CollectionIDNotFoundException('ID "' . $ID . '" does not exist in collection');
        }
    }
1010685
public void deleteObjects(Collection objects)
    {
        for (Iterator iterator = objects.iterator(); iterator.hasNext();)
        {
            getDatabase().deletePersistent(iterator.next());
        }
    }
980060
@Override
  public void dropCollection(String collectionName) {
    CollectionMetaData cmd = cmdMap.get(collectionName);
    if((null == cmd) || (!collectionsRef.get().containsKey(collectionName))) {
      throw new InvalidJsonDbApiUsageException("Collection by name '" + collectionName + "' not found. Create collection first.");
    }
    cmd.getCollectionLock().writeLock().lock();
    try {
      File toDelete = fileObjectsRef.get().get(collectionName);
      try {
        Files.deleteIfExists(toDelete.toPath());
      } catch (IOException e) {
        logger.error("IO Exception deleting the collection file {}", toDelete.getName(), e);
        throw new InvalidJsonDbApiUsageException("Unable to create a collection file for collection: " + collectionName);
      }
      //cmdMap.remove(collectionName); //Do not remove it from the CollectionMetaData Map.
      //Someone might want to re insert a new collection of this type.
      fileObjectsRef.get().remove(collectionName);
      collectionsRef.get().remove(collectionName);
      contextsRef.get().remove(collectionName);
    } finally {
      cmd.getCollectionLock().writeLock().unlock();
    }
  }
837367
public void delete(Collection<String> eventIds, boolean cancelClaims) {
        _eventStore.delete(_readChannel, eventIds, cancelClaims);
    }
729041
function(model, options) {
      delete this._byId[model.cid];
      var id = this.modelId(model.attributes);
      if (id != null) delete this._byId[id];
      if (this === model.collection) delete model.collection;
      model.off('all', this._onModelEvent, this);
    }
350153
def resource_collection_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/resource_collections/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
103474
public DeleteRequestBuilder<T,ID> delete(List<ID> ids)
    {
        return new DeleteRequestBuilder<T, ID>(version,type,entityName, (ID[]) ids.toArray(new Serializable[ids.size()]));
    }
1263339
@RequestMapping(value = "api/profile/delete", method=RequestMethod.POST)
    public
    @ResponseBody
    HashMap<String, Object> removeFromList(Model model, @RequestParam String[] profileIdentifier) throws Exception {
        /* FOR EVERYTHING THAT NEEDS TO BE DELETED,
            DELETE IT.
         */
        logger.info("Want to remove the following ids: {}", Arrays.toString(profileIdentifier));
        for( int i = 0; i < profileIdentifier.length; i++ ) {
            removeFromList(model, profileIdentifier[i]);
        }

        return Utils.getJQGridJSON(profileService.findAllProfiles(), "profiles");
    }
153510
@Override
    public List<DocumentRevision> delete(final String id)
            throws DocumentNotFoundException, DocumentStoreException {
        Misc.checkNotNull(id, "ID");
        try {
            if (id.startsWith(CouchConstants._local_prefix)) {
                String localId = id.substring(CouchConstants._local_prefix.length());
                deleteLocalDocument(localId);
                // for local documents there is no "new document" to return as the document is
                // removed rather than updated with a tombstone
                return Collections.singletonList(null);
            } else {
                return get(queue.submitTransaction(new DeleteAllRevisionsCallable(id)));
            }
        } catch (ExecutionException e) {
            // documentnotfoundexception if it was a non-existent local document
            throwCauseAs(e, DocumentNotFoundException.class);
            String message = "Failed to delete document";
            logger.log(Level.SEVERE, message, e);
            throw new DocumentStoreException(message, e.getCause());
        }
    }
1364959
public int deleteIdsCascade(Collection<String> idCollection,
			boolean userTable) throws SQLException {
		int count = 0;
		if (idCollection != null) {
			for (String id : idCollection) {
				count += deleteByIdCascade(id, userTable);
			}
		}
		return count;
	}
864564
function(id) {
		var self = this;
		this.collection.each(function(model) {
			if (model.id == id || _(id).contains(model.id)) { return; }
//			console.log("Unselecting model", model.id, id);

			self.getStateModel(model).set({
				selected: false
			});
		});
	}