protected void deleteImportationSchemeModels() {
    List<Long> schemeModelIdsToDelete = new ArrayList<Long>();
    final List<ImportationSchemeModelDTO> importationSchemeSelection =
        view.getImportationSchemeModelsSelection();
    for (ImportationSchemeModelDTO importationSchemeModel : importationSchemeSelection) {
      schemeModelIdsToDelete.add(Long.valueOf(importationSchemeModel.getId()));
    }
    final DeleteImportationSchemeModels cmdDelete = new DeleteImportationSchemeModels();
    cmdDelete.setImportationSchemeIdsList(schemeModelIdsToDelete);
    dispatcher.execute(
        cmdDelete,
        view.getImportationSchemeModelsLoadingMonitor(),
        new AsyncCallback<VoidResult>() {

          @Override
          public void onFailure(Throwable caught) {
            // TODO
            // Auto-generated
            // method stub

          }

          @Override
          public void onSuccess(VoidResult result) {
            Notification.show(
                I18N.CONSTANTS.infoConfirmation(),
                I18N.CONSTANTS.adminImportationSchemesDeleteConfirm());
            for (ImportationSchemeModelDTO importationSchemeModelDTO : importationSchemeSelection) {
              view.getImportationSchemeModelsStore().remove(importationSchemeModelDTO);
            }
          }
        });
  }
  protected void deleteVariableFlexibleElements() {
    List<Long> variableFlexibleElementIdsToDelete = new ArrayList<Long>();
    final List<VariableFlexibleElementDTO> variableFlexibleElementsSelection =
        view.getVariableFlexibleElementsSelection();
    for (VariableFlexibleElementDTO variableFlexibleElement : variableFlexibleElementsSelection) {
      variableFlexibleElementIdsToDelete.add(Long.valueOf(variableFlexibleElement.getId()));
    }
    final DeleteImportationSchemeModels cmdDelete = new DeleteImportationSchemeModels();
    cmdDelete.setVariableFlexibleElemementIdsList(variableFlexibleElementIdsToDelete);
    dispatcher.execute(
        cmdDelete,
        view.getVariableFlexibleElementsLoadingMonitor(),
        new AsyncCallback<VoidResult>() {

          @Override
          public void onFailure(Throwable caught) {
            // TODO
            // Auto-generated
            // method stub

          }

          @Override
          public void onSuccess(VoidResult result) {
            Notification.show(
                I18N.CONSTANTS.infoConfirmation(), I18N.CONSTANTS.adminVariableDeleteConfirm());
            for (VariableFlexibleElementDTO variableFlexibleElement :
                variableFlexibleElementsSelection) {
              view.getVariableFlexibleElementsStore().remove(variableFlexibleElement);
              view.getCurrentImportationSchemeModelDTO()
                  .getVariableFlexibleElementsDTO()
                  .remove(variableFlexibleElement);
            }
          }
        });
  }