private Criteria[] prepareCompanyUpdate(Criteria criteria, AbstractDao dao) throws DaoException {
        Integer idCompany = Integer.decode(ConfigurationManager.getProperty("db.company.id"));
        Criteria[] crit = new Criteria[]{new Criteria(), new Criteria()};
        crit[0].addParam(DAO_ID_USER, idCompany);
        crit[0].addParam(DAO_USER_SELECT_FOR_UPDATE, true);
        List<User> companys = dao.findUsers(crit[0]);
        if (companys.isEmpty()) {
            throw new DaoException("Company not found.");
        }
        Float companyBalance = companys.get(0).getBalance();
        Float finalPrice = (Float) criteria.getParam(DAO_ORDER_FINAL_PRICE);
        crit[1].addParam(DAO_USER_BALANCE, companyBalance + finalPrice);
        return crit;
    }