BitstreamFormat unknown = findUnknown(bfContext);
    public void delete() throws SQLException, AuthorizeException    {        // Check authorisation - only administrators can delete formats        if (!AuthorizeManager.isAdmin(bfContext))        {            throw new AuthorizeException(                    "Only administrators can delete bitstream formats");        }        // Remove from cache        bfContext.removeCached(this, getID());        // Find "unknown" type        BitstreamFormat unknown = findUnknown(bfContext);        // Set bitstreams with this format to "unknown"        int numberChanged = DatabaseManager.updateQuery(bfContext,                "UPDATE bitstream SET bitstream_format_id=" + unknown.getID()                        + " WHERE bitstream_format_id=" + getID());        // Delete extensions        DatabaseManager.updateQuery(bfContext,                "DELETE FROM fileextension WHERE bitstream_format_id="                        + getID());        // Delete this format from database        DatabaseManager.delete(bfContext, bfRow);        log.info(LogManager.getHeader(bfContext, "delete_bitstream_format",                "bitstream_format_id=" + getID() + ",bitstreams_changed="                        + numberChanged));    }