Remove entity from the MatchBox.

        :param object entity:
169121
def remove(self, entity):
        
        empty_traits = set()
        self.mismatch_unknown.discard(entity)
        for trait, entities in self.index.items():
            entities.discard(entity)
            if not entities:
                empty_traits.add(trait)

        for empty_trait in empty_traits:
            del self.index[empty_trait]
827925
def remove_entities(status, entitylist):
    ''''''
    try:
        entities = status.entities
        text = status.text
    except AttributeError:
        entities = status.get('entities', dict())
        text = status['text']

    indices = [ent['indices'] for etype, entval in list(entities.items()) for ent in entval if etype in entitylist]
    indices.sort(key=lambda x: x[0], reverse=True)

    for start, end in indices:
        text = text[:start] + text[end:]

    return text
117875
public void remove(SchemaObject object, Right right) {

        if (right.isFull) {
            clear();

            return;
        }

        if (isFull) {
            isFull = false;
            isFullSelect = isFullInsert = isFullUpdate = isFullReferences =
                isFullDelete = true;
        }

        if (right.isFullDelete) {
            isFullDelete = false;
        }

        if (!isFullSelect && selectColumnSet == null) {}
        else if (right.isFullSelect) {
            isFullSelect    = false;
            selectColumnSet = null;
        } else if (right.selectColumnSet != null) {
            if (isFullSelect) {
                isFullSelect    = false;
                selectColumnSet = ((Table) object).getColumnNameSet();
            }

            selectColumnSet.removeAll(right.selectColumnSet);

            if (selectColumnSet.isEmpty()) {
                selectColumnSet = null;
            }
        }

        if (!isFullInsert && insertColumnSet == null) {}
        else if (right.isFullInsert) {
            isFullInsert    = false;
            insertColumnSet = null;
        } else if (right.insertColumnSet != null) {
            if (isFullInsert) {
                isFullInsert    = false;
                insertColumnSet = ((Table) object).getColumnNameSet();
            }

            insertColumnSet.removeAll(right.insertColumnSet);

            if (insertColumnSet.isEmpty()) {
                insertColumnSet = null;
            }
        }

        if (!isFullUpdate && updateColumnSet == null) {}
        else if (right.isFullUpdate) {
            isFullUpdate    = false;
            updateColumnSet = null;
        } else if (right.updateColumnSet != null) {
            if (isFullUpdate) {
                isFullUpdate    = false;
                updateColumnSet = ((Table) object).getColumnNameSet();
            }

            updateColumnSet.removeAll(right.updateColumnSet);

            if (updateColumnSet.isEmpty()) {
                updateColumnSet = null;
            }
        }

        if (!isFullReferences && referencesColumnSet == null) {}
        else if (right.isFullReferences) {
            isFullReferences    = false;
            referencesColumnSet = null;
        } else if (right.referencesColumnSet != null) {
            if (isFullReferences) {
                isFullReferences    = false;
                referencesColumnSet = ((Table) object).getColumnNameSet();
            }

            referencesColumnSet.removeAll(right.referencesColumnSet);

            if (referencesColumnSet.isEmpty()) {
                referencesColumnSet = null;
            }
        }

        if (!isFullTrigger && triggerColumnSet == null) {}
        else if (right.isFullTrigger) {
            isFullTrigger    = false;
            triggerColumnSet = null;
        } else if (right.triggerColumnSet != null) {
            if (isFullTrigger) {
                isFullTrigger    = false;
                triggerColumnSet = ((Table) object).getColumnNameSet();
            }

            triggerColumnSet.removeAll(right.triggerColumnSet);

            if (triggerColumnSet.isEmpty()) {
                triggerColumnSet = null;
            }
        }
    }
1214999
public function remove(AbstractEntity $entity)
    {
        $this->getEntityManager()->remove($entity);
        $this->getEntityManager()->flush();
    }
1346392
@Transactional
    public void delete(E entity) {
        if (entityManager.contains(entity)) {
            entityManager.remove(entity);
        } else {
            // could be a delete on a transient instance
            E entityRef = entityManager.getReference(type, entity.getId());

            if (entityRef != null) {
                entityManager.remove(entityRef);
            } else {
                log.warning("Attempt to delete an instance that is not present in the database: " + entity);
            }
        }
    }
959701
public function deleteObject($entity, $_id)
	{
		$retValue = false;

		try{
			$query = array('_id' => new MongoId($_id));

			if (! is_null($this->_db)){
				$mongo = $this->_db->selectCollection($entity);

			    // Remove Object
				$result = $mongo->remove($query, array('w' => 1));
				
				if ($result["n"] > 0)
					$retValue = true;
			}
		}
		catch (Exception $e) {
			$this->_log->addError($e->getMessage());
		    $retValue = false;
		}

		return $retValue;
	}
1140701
@Override
    public void detach(Object entity) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "em.detach(" + entity + ");\n" + toString());

        getEMInvocationInfo(false).detach(entity);
    }
97497
def remove_entity(self, entity, second=False):
        '''
        
        '''
        if entity in self._entities:
            if second:
                for group in self._groups.keys():
                    if entity in self._groups[group]:
                        self.deregister_entity_from_group(entity, group)
                self._entities.remove(entity)
            else:
                entity.kill()
        else:
            raise UnmanagedEntityError(entity)
1359596
public function remove($entity)
    {
        $objectManager = $this->getObjectManager();
        $objectManager->remove($entity);
        $objectManager->flush();
    }
998795
public void remove (Object object) {
		if (!idToObject.containsValue(object, true)) return;
		int objectID = idToObject.findKey(object, true, -1);
		idToObject.remove(objectID);
		objectToID.remove(object, 0);
		if (TRACE) trace("kryonet", "Object " + objectID + " removed from ObjectSpace: " + object);
	}
971675
@Override
    public void delete(Object entity, Object pKey)
    {
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entity.getClass());
        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                entityMetadata.getPersistenceUnit());
        AbstractManagedType managedType = (AbstractManagedType) metaModel.entity(entityMetadata.getEntityClazz());

        DBObject query = new BasicDBObject();

        if (managedType.hasLobAttribute())
        {
            KunderaGridFS gfs = new KunderaGridFS(mongoDb, entityMetadata.getTableName());
            String id = ((AbstractAttribute) entityMetadata.getIdAttribute()).getJPAColumnName();
            query.put("metadata." + id, pKey);
            gfs.remove(query);
        }

        else
        {
            if (metaModel.isEmbeddable(entityMetadata.getIdAttribute().getBindableJavaType()))
            {
                MongoDBUtils.populateCompoundKey(query, entityMetadata, metaModel, pKey);
            }
            else
            {
                query.put("_id", MongoDBUtils.populateValue(pKey, pKey.getClass()));
            }
            // For secondary tables.
            List<String> secondaryTables = ((DefaultEntityAnnotationProcessor) managedType.getEntityAnnotation())
                    .getSecondaryTablesName();
            secondaryTables.add(entityMetadata.getTableName());

            for (String collectionName : secondaryTables)
            {
                KunderaCoreUtils.printQuery("Drop existing collection:" + query, showQuery);
                DBCollection dbCollection = mongoDb.getCollection(collectionName);
                dbCollection.remove(query, getWriteConcern(), encoder);
            }

            getIndexManager().remove(entityMetadata, entity, pKey);
        }
    }
1093424
def delete(self, eid):
		
		result = self._http_req('connections/%u' % eid, method='DELETE')
		status = result['status']
		if not status == 302:
			raise ServiceRegistryError(status, "Could not delete entity %u: %u" % (eid,status))

		self.debug(0x01,result)
		return result['decoded']
1344052
@Override
    protected void delete(Object entity, Object pKey)
    {
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entity.getClass());
        r.db(entityMetadata.getSchema()).table(entityMetadata.getTableName()).get(pKey).delete().run(connection);
    }
559263
@SuppressWarnings("unchecked")
	@Override
	public int delete(final Object entity) {
		@SuppressWarnings("rawtypes")
		EntityHandler handler = this.getEntityHandler();
		if (!handler.getEntityType().isInstance(entity)) {
			throw new IllegalArgumentException("Entity type not supported");
		}

		try {
			Class<?> type = entity.getClass();
			TableMetadata metadata = handler.getMetadata(this.transactionManager, type);
			SqlContext context = handler.createDeleteContext(this, metadata, type, true);
			context.setSqlKind(SqlKind.DELETE);
			handler.setDeleteParams(context, entity);
			return handler.doDelete(this, context, entity);
		} catch (SQLException e) {
			throw new EntitySqlRuntimeException(SqlKind.DELETE, e);
		}
	}
637547
def remove(self, record):
        """"""
        self._field.validate_value(record)
        del self._elements[record.id]
        self._sync_field()
272947
public <T> void delete(T entity) {
        if (entity == null) {
            throw new IllegalArgumentException("Entity cannot be null");
        }

        DocumentInfo value = documentsByEntity.get(entity);
        if (value == null) {
            throw new IllegalStateException(entity + " is not associated with the session, cannot delete unknown entity instance");
        }

        deletedEntities.add(entity);
        includedDocumentsById.remove(value.getId());
        if (_countersByDocId != null) {
            _countersByDocId.remove(value.getId());
        }
        _knownMissingIds.add(value.getId());
    }
276319
public <T> void evict(T entity) {
        DocumentInfo documentInfo = documentsByEntity.get(entity);
        if (documentInfo != null) {
            documentsByEntity.remove(entity);
            documentsById.remove(documentInfo.getId());
        }

        deletedEntities.remove(entity);
        if (_countersByDocId != null) {
            _countersByDocId.remove(documentInfo.getId());
        }
    }