Deletes mock data records using references in {@link MockDataLog}

@param string The class of records to delete
508376
protected function cleanup($className)
    {
        $classes = ($className == "__all__") ? MockDataLog::get()->column('RecordClass') : array($className);
        foreach ($classes as $recordClass) {
            $logs = MockDataLog::get()->filter(array('RecordClass' => $recordClass));
            $ids = $logs->column('RecordID');
            $list = DataList::create($recordClass)->byIDs($ids);
            $this->writeOut("Deleting " . $list->count() . " $recordClass records");
            $list->removeAll();
            $this->writeOut("Done.");
            $logs->removeAll();
        }
    }
338848
@Override
    public void destroy() {
    	 if (dataRecorderLifycycleListner != null) {
         this.dataRecorderLifycycleListner.recorderDataRecorderClosed(this);
         }
        try {
            this.dataLogger.destroy();
        } catch (IOException e) {
            throw new DelegatedRuntimeException(e);
        }
    }
723139
public function delete() {
        global $DB;

        if (empty($this->id)) {
            debugging('Can not delete data object, no id!');
            return false;
        }

        $data = $this->get_record_data();

        if ($DB->delete_records($this->table, array('id'=>$this->id))) {
            $this->notify_changed(true);
            return true;

        } else {
            return false;
        }
    }
1173120
protected void deleteCurrentRowData() throws SQLException {
    //move data
    System.arraycopy(data, rowPointer + 1, data, rowPointer, dataSize - 1 - rowPointer);
    data[dataSize - 1] = null;
    dataSize--;
    lastRowPointer = -1;
    previous();
  }
310411
protected void deleteRecord(Connection connection, String hash)
            throws SQLException {
        int id = selectRecordId(hash);
        if (id > 0) {
            String[] queries = new String[] { Query.DELETE_FILEHASHES,
                    Query.DELETE_METAS, Query.DELETE_CVES,
                    Query.DELETE_RECORD_ID };
            for (String query : queries) {
                PreparedStatement ps = setObjects(connection, query, id);
                ps.execute();
                ps.close();
            }
        }
    }
403778
@Override
    public void delete(
            final ObjectClass objClass,
            final Uid uid,
            final OperationOptions options) {

        LOG.ok("Account deletion");

        // check objectclass
        if (objClass == null || (!objClass.equals(ObjectClass.ACCOUNT))) {
            throw new IllegalArgumentException("Invalid objectclass");
        }

        // get web service client
        final Provisioning provisioning = connection.getProvisioning();
        if (provisioning == null) {
            throw new IllegalStateException("Web Service client not found");
        }

        try {
            provisioning.delete(uid.getUidValue());
        } catch (ProvisioningException e) {
            throw new ConnectorException("Deletion failed", e);
        } catch (Throwable t) {
            throw new ConnectorException("Communication exception", t);
        }
    }
1331941
public int delete(DatabaseConnection databaseConnection, T data, ObjectCache objectCache) throws SQLException {
		if (mappedDelete == null) {
			mappedDelete = MappedDelete.build(dao, tableInfo);
		}
		int result = mappedDelete.delete(databaseConnection, data, objectCache);
		if (dao != null && !localIsInBatchMode.get()) {
			dao.notifyChanges();
		}
		return result;
	}
1202070
void deleteRow(String storeName, Map<String, AttributeValue> key) {
        String tableName = storeToTableName(storeName);
        m_logger.debug("Deleting row from table {}, key={}", tableName, DynamoDBService.getDDBKey(key));
        
        Timer timer = new Timer();
        boolean bSuccess = false;
        for (int attempts = 1; !bSuccess; attempts++) {
            try {
                m_ddbClient.deleteItem(tableName, key);
                if (attempts > 1) {
                    m_logger.info("deleteRow() succeeded on attempt #{}", attempts);
                }
                bSuccess = true;
                m_logger.debug("Time to delete table {}, key={}: {}",
                               new Object[]{tableName, DynamoDBService.getDDBKey(key), timer.toString()});
            } catch (ProvisionedThroughputExceededException e) {
                if (attempts >= m_max_commit_attempts) {
                    String errMsg = "All retries exceeded; abandoning deleteRow() for table: " + tableName;
                    m_logger.error(errMsg, e);
                    throw new RuntimeException(errMsg, e);
                }
                m_logger.warn("deleteRow() attempt #{} failed: {}", attempts, e);
                try {
                    Thread.sleep(attempts * m_retry_wait_millis);
                } catch (InterruptedException ex2) {
                    // ignore
                }
            }
        }
    }
597763
@Override
    public Session delete(String id) throws Exception {
        // get the session, if its not in memory, this will load it
        Session session = get(id);

        // Always delete it from the backing data store
        if (sessionDataStore != null) {
            boolean deleted = sessionDataStore.delete(id);
            if (log.isDebugEnabled()) {
                log.debug("Session " + id + " deleted in db: " + deleted);
            }
        }

        // delete it from the session object store
        if (session != null) {
            session.stopInactivityTimer();
            session.setResident(false);
        }

        return doDelete(id);
    }
824171
@Override
  protected void deleteEntity(DbEntityOperation operation) {

    final DbEntity dbEntity = operation.getEntity();

    // get statement
    String deleteStatement = dbSqlSessionFactory.getDeleteStatement(dbEntity.getClass());
    ensureNotNull("no delete statement for " + dbEntity.getClass() + " in the ibatis mapping files", "deleteStatement", deleteStatement);

    LOG.executeDatabaseOperation("DELETE", dbEntity);

    // execute the delete
    int nrOfRowsDeleted = executeDelete(deleteStatement, dbEntity);
    operation.setRowsAffected(nrOfRowsDeleted);

    // It only makes sense to check for optimistic locking exceptions for objects that actually have a revision
    if (dbEntity instanceof HasDbRevision && nrOfRowsDeleted == 0) {
      operation.setFailed(true);
      return;
    }

    // perform post delete action
    entityDeleted(dbEntity);
  }
811849
public function delete()
    {
        $this->brokenOnDelete = true;
        $this->onBeforeDelete();
        if ($this->brokenOnDelete) {
            user_error("$this->class has a broken onBeforeDelete() function."
            . " Make sure that you call parent::onBeforeDelete().", E_USER_ERROR);
        }

        $path = $this->getFullPath();
        if (file_exists($path)) {
            unlink($path);
        }
        if ($this->storeRecord) {
            $this->storeRecord->delete();
        }

        $this->flushCache();
        $this->onAfterDelete();
    }
1279671
@Override
    public T deleteClass(String fullyQualifiedClassName) throws IllegalArgumentException {
        Validate.notNull(fullyQualifiedClassName, "Class name must be specified");

        ArchivePath path = new BasicPath(getClassesPath(), AssetUtil.getFullPathForClassResource(fullyQualifiedClassName));

        getArchive().delete(path);

        return covarientReturn();
    }
76395
public function delete($id = null)
    {
        if (!is_null($id)) {
            $this->load($id);
        }
        if (!$this->loaded()) {
            throw $this->exception('Unable to determine which record to delete');
        }

        $tmp = $this->dsql;

        $this->initQuery();
        $delete = $this->dsql->where($this->id_field, $this->id);

        $delete->owner->beginTransaction();
        $this->hook('beforeDelete', array($delete));
        $delete->delete();
        $this->hook('afterDelete');
        $delete->owner->commit();

        $this->dsql = $tmp;
        $this->unload();

        return $this;
    }
848027
public function delete() {
        global $CFG, $DB;
        require_once($CFG->libdir.'/gradelib.php');
        require_once($CFG->dirroot.'/calendar/lib.php');

        $cm = get_coursemodule_from_instance('lesson', $this->properties->id, $this->properties->course);
        $context = context_module::instance($cm->id);

        $this->delete_all_overrides();

        grade_update('mod/lesson', $this->properties->course, 'mod', 'lesson', $this->properties->id, 0, null, array('deleted'=>1));

        // We must delete the module record after we delete the grade item.
        $DB->delete_records("lesson", array("id"=>$this->properties->id));
        $DB->delete_records("lesson_pages", array("lessonid"=>$this->properties->id));
        $DB->delete_records("lesson_answers", array("lessonid"=>$this->properties->id));
        $DB->delete_records("lesson_attempts", array("lessonid"=>$this->properties->id));
        $DB->delete_records("lesson_grades", array("lessonid"=>$this->properties->id));
        $DB->delete_records("lesson_timer", array("lessonid"=>$this->properties->id));
        $DB->delete_records("lesson_branch", array("lessonid"=>$this->properties->id));
        if ($events = $DB->get_records('event', array("modulename"=>'lesson', "instance"=>$this->properties->id))) {
            $coursecontext = context_course::instance($cm->course);
            foreach($events as $event) {
                $event->context = $coursecontext;
                $event = calendar_event::load($event);
                $event->delete();
            }
        }

        // Delete files associated with this module.
        $fs = get_file_storage();
        $fs->delete_area_files($context->id);

        return true;
    }
56877
@Override
	public synchronized void delete(int type, String url) throws DatabaseException {
    	SqlPreparedStatementWrapper psDeleteUrls = null;
        try {
        	psDeleteUrls = DbSQL.getSingleton().getPreparedStatement("sessionurl.ps.deleteurls");
			psDeleteUrls.getPs().setInt(1, type);
			psDeleteUrls.getPs().setString(2, url);
			psDeleteUrls.getPs().executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psDeleteUrls);
		}
    }
114645
public void deleteClassPipe(String className, String pipeName) throws DevFailed {
        databaseDAO.deleteClassPipe(this, className, pipeName);
    }
516073
final public function delete() {
        global $DB;

        if ($this->raw_get('id') <= 0) {
            throw new coding_exception('id is required to delete');
        }

        // Hook before delete.
        $this->before_delete();

        $result = $DB->delete_records(static::TABLE, array('id' => $this->raw_get('id')));

        // Hook after delete.
        $this->after_delete($result);

        // Reset the ID to avoid any confusion, this also invalidates the model's data.
        if ($result) {
            $this->raw_set('id', 0);
        }

        return $result;
    }