" WHERE " + (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") + "id = ?");
" WHERE " + IN_THIS_MAILBOX_AND + "id = ?");
    public static UnderlyingData getById(Mailbox mbox, int id, byte type) throws ServiceException {        if (Mailbox.isCachedType(type))            throw ServiceException.INVALID_REQUEST("folders and tags must be retrieved from cache", null);        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        ResultSet rs = null;        try {            stmt = conn.prepareStatement("SELECT " + DB_FIELDS +                    " FROM " + getMailItemTableName(mbox.getId(), "mi") +                    " WHERE " +                    (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") +                    "id = ?");            int pos = 1;            if (DebugConfig.enableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.setInt(pos++, id);            rs = stmt.executeQuery();            if (!rs.next())                throw MailItem.noSuchItem(id, type);            UnderlyingData data = constructItem(rs);            if (!MailItem.isAcceptableType(type, data.type))                throw MailItem.noSuchItem(id, type);            if (data.type == MailItem.TYPE_CONVERSATION)                completeConversation(mbox, data);            return data;        } catch (SQLException e) {            throw ServiceException.FAILURE("fetching item " + id, e);        } finally {            DbPool.closeResults(rs);            DbPool.closeStatement(stmt);        }    }