private InternalResultsResponse<Cidade> createFetchResponse() {
      if (EXCEPTION.equals(getReturnResult())) {
        throw new RuntimeException("Boom");
      }

      InternalResultsResponse<Cidade> response = new InternalResultsResponse<Cidade>();
      if (FETCH_FAILURE.equals(getReturnResult())) {
        response.addMessage(getFailureMessageCode(), MessageSeverity.Error, MessageLevel.Other);
        response.setStatus(Status.UnspecifiedError);
        return response;
      }

      response.addResult(new Cidade());
      return response;
    }
  @Override
  public Integer insertEventoPessoa(EventoPessoa evento) {
    Integer insertCount = 0;
    InternalResultsResponse<EventoPessoa> response = new InternalResultsResponse<EventoPessoa>();

    // First insert the root
    // Is successful the unique-id will be populated back into the object.
    insertCount =
        QATMyBatisDacHelper.doInsert(
            getSqlSession(), "EventoMap.insertEventoPessoa", evento, response);

    // Finally, if something was inserted then add the Beneficios to the result.
    if (insertCount > 0) {
      response.addResult(evento);
    }

    return insertCount;
  }
  /*
   * (non-Javadoc)
   * @see
   * com.prosperitasglobal.sendsolv.dac.IExameDAC#insertExame(com.prosperitasglobal.sendsolv.model
   * .Exame)
   */
  @Override
  public Integer insertExame(Exame banco, String string, InternalResultsResponse<?> response1) {
    Integer insertCount = 0;
    InternalResultsResponse<Exame> response = new InternalResultsResponse<Exame>();

    // First insert the root
    // Is successful the unique-id will be populated back into the object.
    insertCount =
        QATMyBatisDacHelper.doInsert(getSqlSession(), EMPRESA_STMT_INSERT, banco, response);

    if (response.isInError()) {
      return null;
    }

    // Finally, if something was inserted then add the Exame to the result.
    if (insertCount > 0) {
      response.addResult(banco);
    }
    response1 = response;
    return insertCount;
  }
  /*
   * (non-Javadoc)
   * @see
   * com.prosperitasglobal.sendsolv.dac.ITelaDAC#insertTela(com.prosperitasglobal.sendsolv.model
   * .Tela)
   */
  @Override
  public InternalResultsResponse<Tela> insertTela(Tela tela) {
    Integer insertCount = 0;
    InternalResultsResponse<Tela> response = new InternalResultsResponse<Tela>();

    // First insert the root
    // Is successful the unique-id will be populated back into the object.
    insertCount = QATMyBatisDacHelper.doInsert(getSqlSession(), TELA_STMT_INSERT, tela, response);

    if (response.isInError()) {
      return response;
    }
    // Next traverse the object graph and "maintain" the associations
    insertCount += maintainTelaAssociations(tela, response);

    // Finally, if something was inserted then add the Tela to the result.
    if (insertCount > 0) {
      response.addResult(tela);
    }

    return response;
  }
  @Override
  public Integer updateEventoPessoa(EventoPessoa evento) {
    Integer updateCount = 0;
    InternalResultsResponse<EventoPessoa> response = new InternalResultsResponse<EventoPessoa>();

    // First update the root if necessary.
    if (!ValidationUtil.isNull(evento.getModelAction())
        && (evento.getModelAction() == QATModel.PersistanceActionEnum.UPDATE)) {
      updateCount =
          QATMyBatisDacHelper.doUpdate(
              getSqlSession(), "EventoMap.updateEventoPessoa", evento, response);
    }

    if (response.isInError()) {
      return null;
    }

    // Finally, if something was updated then add the Person to the result.
    if (updateCount > 0) {
      response.addResult(evento);
    }

    return updateCount;
  }
  /*
   * (non-Javadoc)
   * @see
   * com.prosperitasglobal.sendsolv.dac.ITelaDAC#updateTela(com.prosperitasglobal.sendsolv.model
   * .Tela)
   */
  @Override
  public InternalResultsResponse<Tela> updateTela(Tela tela) {
    Integer updateCount = 0;
    InternalResultsResponse<Tela> response = new InternalResultsResponse<Tela>();

    // First update the root if necessary.
    if (!ValidationUtil.isNull(tela.getModelAction())
        && (tela.getModelAction() == QATModel.PersistanceActionEnum.UPDATE)) {
      updateCount = QATMyBatisDacHelper.doUpdate(getSqlSession(), TELA_STMT_UPDATE, tela, response);
    }

    if (response.isInError()) {
      return response;
    }
    // Next traverse the object graph and "maintain" the associations
    updateCount += maintainTelaAssociations(tela, response);

    // Finally, if something was updated then add the Person to the result.
    if (updateCount > 0) {
      response.addResult(tela);
    }

    return response;
  }
 private InternalResultsResponse<CallingCardInfo> returnInsert(CallingCardInfo callingCardInfo) {
   InternalResultsResponse<CallingCardInfo> response =
       new InternalResultsResponse<CallingCardInfo>();
   response.addResult(callingCardInfo);
   return response;
 }