" WHERE " + (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") + target + " AND type NOT IN " + FOLDER_TYPES);
" WHERE " + IN_THIS_MAILBOX_AND + target + " AND type NOT IN " + FOLDER_TYPES);
    public static void deleteContents(MailItem item) throws ServiceException {        String target;        if (item instanceof VirtualConversation)  target = "id = ?";        else if (item instanceof Conversation)    target = "parent_id = ?";        else if (item instanceof SearchFolder)    return;        else if (item instanceof Folder)          target = "folder_id = ?";        else                                      return;        Mailbox mbox = item.getMailbox();        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        try {            stmt = conn.prepareStatement("DELETE FROM " + getMailItemTableName(item) +                    " WHERE " +                    (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") +                    target + " AND type NOT IN " + FOLDER_TYPES);            int pos = 1;            if (DebugConfig.enableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.setInt(pos++, item instanceof VirtualConversation ? ((VirtualConversation) item).getMessageId() : item.getId());            stmt.executeUpdate();        } catch (SQLException e) {            throw ServiceException.FAILURE("deleting contents for " + MailItem.getNameForType(item) + " " + item.getId(), e);        } finally {            DbPool.closeStatement(stmt);        }    }