throw ServiceException.FAILURE("writing name for mailbox " + item.getMailboxId() + ", item " + item.getId(), e);
if (e.getErrorCode() == Db.Error.DUPLICATE_ROW) throw MailServiceException.ALREADY_EXISTS(name, e); else throw ServiceException.FAILURE("writing name for mailbox " + item.getMailboxId() + ", item " + item.getId(), e);
    public static void saveName(MailItem item) throws ServiceException {        Mailbox mbox = item.getMailbox();        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        String name = item.getName().equals("") ? null : item.getName();        try {            stmt = conn.prepareStatement("UPDATE " + getMailItemTableName(item) +                    " SET date = ?, size = ?, name = ?, mod_metadata = ?, change_date = ?, mod_content = ?" +                    " WHERE " + IN_THIS_MAILBOX_AND + "id = ?");            int pos = 1;            stmt.setInt(pos++, (int) (item.getDate() / 1000));            stmt.setInt(pos++, item.getSize());            stmt.setString(pos++, name);            stmt.setInt(pos++, mbox.getOperationChangeID());            stmt.setInt(pos++, mbox.getOperationTimestamp());            stmt.setInt(pos++, mbox.getOperationChangeID());            if (!DebugConfig.disableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.setInt(pos++, item.getId());            stmt.executeUpdate();        } catch (SQLException e) {            throw ServiceException.FAILURE("writing name for mailbox " + item.getMailboxId() + ", item " + item.getId(), e);        } finally {            DbPool.closeStatement(stmt);        }    }