" SET type = ? WHERE " + (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") + "id = ?");
" SET type = ? WHERE " + IN_THIS_MAILBOX_AND + "id = ?");
    public static void changeType(MailItem item, byte type) throws ServiceException {        Connection conn = item.getMailbox().getOperationConnection();        PreparedStatement stmt = null;        try {            stmt = conn.prepareStatement("UPDATE " + getMailItemTableName(item) +                    " SET type = ? WHERE " +                    (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") +                    "id = ?");            int pos = 1;            stmt.setInt(pos++, type);            if (DebugConfig.enableMailboxGroup)                stmt.setInt(pos++, item.getMailboxId());            stmt.setInt(pos++, item.getId());            stmt.executeUpdate();        } catch (SQLException e) {            throw ServiceException.FAILURE("writing new type for item " + item.getId(), e);        } finally {            DbPool.closeStatement(stmt);        }    }