# HG changeset patch
# User Antonio Moreno <antonio.moreno@openbravo.com>
# Date 1456341956 -3600
#      Wed Feb 24 20:25:56 2016 +0100
# Node ID ac69d86a26058dd0a123d135096ff72309e92dc4
# Parent  216fb4e6048c4546b3ade9e36c58dc27f810d900
Fixed issue 32331. Added method to check if importentry has status 'Error'

diff -r 216fb4e6048c -r ac69d86a2605 src/org/openbravo/service/importprocess/ImportEntryManager.java
--- a/src/org/openbravo/service/importprocess/ImportEntryManager.java	Tue Feb 23 16:05:13 2016 +0530
+++ b/src/org/openbravo/service/importprocess/ImportEntryManager.java	Wed Feb 24 20:25:56 2016 +0100
@@ -424,6 +424,14 @@
   }
 
   /**
+   * Returns whether the ImportEntry is in status Error in the same transaction as the caller.
+   */
+  public boolean isImportEntryError(String importEntryId) {
+    ImportEntry importEntry = OBDal.getInstance().get(ImportEntry.class, importEntryId);
+    return importEntry != null && "Error".equals(importEntry.getImportStatus());
+  }
+
+  /**
    * Sets an {@link ImportEntry} in status Error but does this in its own transaction so not
    * together with the original data. This is relevant when the previous transaction which tried to
    * import the data fails.
