/**
   * Process.
   *
   * @param indicator the indicator
   * @param persistType the persist type
   * @param request the request
   * @return the servico response
   */
  private InternalResultsResponse<Servico> processServico(
      ValidationContextIndicator indicator,
      PersistenceActionEnum persistType,
      ServicoMaintenanceRequest request) {
    InternalResultsResponse<Servico> response = null;

    // Persist
    InternalResponse internalResponse = doPersistenceServico(request.getServico(), persistType);
    if (internalResponse.isInError()) {
      response = new InternalResultsResponse<Servico>();
      response.setStatus(internalResponse.getError());
      response.addMessages(internalResponse.getMessageInfoList());
      response.addMessage(
          DEFAULT_SITE_BAC_EXCEPTION_MSG,
          MessageSeverity.Error,
          MessageLevel.Object,
          new Object[] {internalResponse.errorToString()});

      return response;
    }

    // Call maintainReurnList to see if we need to return the servico list and if so whether it
    // should be paged or
    // not
    response =
        maintainReturnListServico(
            request.getReturnList(), request.getReturnListPaged(), new Servico());

    return response;
  }
  /**
   * Validate parent status.
   *
   * @param list the list
   * @param empresa the empresa
   */
  private void validateParentStatus(List<MessageInfo> list, Empresa empresa) {
    InternalResponse applyStatusResponse = new InternalResponse();
    FetchByIdRequest request = new FetchByIdRequest();

    // request.setId(empresa.getParentOrganizationId());
    // InternalResultsResponse<Organization> response =
    // getOrganizationDAC().fetchOrganizationById(request);

    // if (response.isInError())
    // {
    // applyStatusResponse.merge(response);
    // }

    // if (StatusEnum.SETUP.equals(response.getFirstResult().getStatus()))
    // {
    // list.add(
    // new MessageInfo(CBOF_BASE_APPLYSTATUS_STATUS_DENIED,
    // Message.MessageSeverity.Error,
    // Message.MessageLevel.Field,
    // new Object[] {String.valueOf(BusinessTypeEnum.LOCATION).toLowerCase(),
    // empresa.getStatus()}));
    // }

    if (!ValidationUtil.isNull(applyStatusResponse)) {
      list.addAll(applyStatusResponse.getMessageInfoList());
    }
  }