public QueryInputOutputVO getResultListDB(
      String username, String surveyId, QueryInputOutputVO queryIOVO)
      throws MSMApplicationException, MSMSystemException {
    Survey survey = surveyHandler.getSurveyObject(surveyId);

    QueryInputOutputVO result = null;

    if (survey != null) {
      result = resultHandler.getResultListDB(surveyId, queryIOVO);
    } else {
      throw new SurveyNotFoundException();
    }

    return result;
  }
  public void postResult(StringBuffer resultBuffered, TransactionLogVO postResultTransaction)
      throws MSMApplicationException, MSMSystemException {

    ResultParser parser = new ResultParser();
    ResultXml resultBean = null;
    NdgUser userLogged = null;

    try {
      resultBean = parser.parseResult(resultBuffered, "UTF-8");
    } catch (Exception e) {
      throw new ResultNotParsedException();
    }

    if (resultBean != null) {
      ImeiVO imei = imeiManager.getIMEI(resultBean.getImei());
      userLogged = findNdgUserByName(imei.getUserName());
      if (userManager.userAdminHasPositiveBalance(UserVO.RESULT_LIMIT, userLogged.getUserAdmin())) {
        resultHandler.postResult(resultBuffered, postResultTransaction);
        userManager.updateUserAdminBalance(UserVO.RESULT_LIMIT, userLogged.getUserAdmin());
      } else {
        throw new UserLimitReachedException();
      }
    }
  }
 public ResultXml getResultDB(String idResult) throws MSMApplicationException, MSMSystemException {
   ResultXml result = resultHandler.getResultDB(idResult);
   return result;
 }