details:   https://code.openbravo.com/erp/devel/pi/rev/9f730ec444e7
changeset: 35335:9f730ec444e7
user:      Javier Armendáriz <javier.armendariz <at> openbravo.com>
date:      Mon Jan 21 10:59:28 2019 +0100
summary:   Related to issue 39878: Small improvements.

diffstat:

 src/org/openbravo/service/importprocess/ImportEntryBuilder.java |  20 +++------
 1 files changed, 7 insertions(+), 13 deletions(-)

diffs (51 lines):

diff -r 46f6eb5a22dc -r 9f730ec444e7 
src/org/openbravo/service/importprocess/ImportEntryBuilder.java
--- a/src/org/openbravo/service/importprocess/ImportEntryBuilder.java   Mon Jan 
21 10:10:25 2019 +0100
+++ b/src/org/openbravo/service/importprocess/ImportEntryBuilder.java   Mon Jan 
21 10:59:28 2019 +0100
@@ -46,7 +46,7 @@
 
   private static final Logger log = LogManager.getLogger();
 
-  private final String INITIAL_IMPORT_STATUS = "Initial";
+  private static final String INITIAL_IMPORT_STATUS = "Initial";
 
   private List<ImportEntryPreProcessor> entryPreProcessors;
 
@@ -135,8 +135,8 @@
 
   /**
    * Creates a ImportEntry instance, checks that this instance is not already 
created or archived
-   * and then saves it. If setCommitAndClose(true) is called, the transaction 
is commited and then
-   * the connection is closed.
+   * and then saves it. If setNotifyManager(true) is called, the transaction 
is commited, the
+   * connection closed and the ImportEntryManager will be notified of the 
change.
    *
    * @throws ImportEntryAlreadyExistsException
    *           when import entry already exists either in c_import_entry or 
c_import_entry_archive
@@ -208,11 +208,8 @@
       return false;
     }
 
-    final Query<Number> qry = SessionHandler
-        .getInstance()
-        .getSession()
-        .createQuery("select count(*) from " + ImportEntry.ENTITY_NAME + " 
where id=:id",
-            Number.class);
+    final Query<Number> qry = SessionHandler.getInstance().getSession()
+        .createQuery("select count(*) from C_IMPORT_ENTRY where id=:id", 
Number.class);
     qry.setParameter("id", entryId);
 
     return qry.uniqueResult().intValue() > 0;
@@ -223,11 +220,8 @@
       return false;
     }
 
-    final Query<Number> qry = SessionHandler
-        .getInstance()
-        .getSession()
-        .createQuery("select count(*) from " + ImportEntryArchive.ENTITY_NAME 
+ " where id=:id",
-            Number.class);
+    final Query<Number> qry = SessionHandler.getInstance().getSession()
+        .createQuery("select count(*) from C_Import_Entry_Archive where 
id=:id", Number.class);
     qry.setParameter("id", entryId);
 
     return qry.uniqueResult().intValue() > 0;


_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to