Fixess issue 41419: Apply HQL style guide to DocFINBankStatement
authorArmaignac <collazoandy4@gmail.com>
Mon, 22 Jul 2019 16:21:04 -0400
changeset 36428 3bc6b379f2cf
parent 36427 302bd81b609d
child 36429 057aaf20b293
Fixess issue 41419: Apply HQL style guide to DocFINBankStatement

Applied the new HQL style in DocFINBankStatement
src/org/openbravo/erpCommon/ad_forms/DocFINBankStatement.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINBankStatement.java	Thu Aug 08 10:40:46 2019 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINBankStatement.java	Mon Jul 22 16:21:04 2019 -0400
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2018 Openbravo SLU
+ * All portions are Copyright (C) 2010-2019 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -81,18 +81,19 @@
       VariablesSecureApp vars) throws ServletException {
     // Select specific definition
     String strClassname = "";
-    final StringBuilder whereClause = new StringBuilder();
     Fact fact = new Fact(this, as, Fact.POST_Actual);
     OBContext.setAdminMode();
     try {
-      whereClause.append(" as astdt ");
-      whereClause.append(
-          " where astdt.acctschemaTable.accountingSchema.id = '" + as.m_C_AcctSchema_ID + "'");
-      whereClause.append(" and astdt.acctschemaTable.table.id = '" + AD_Table_ID + "'");
-      whereClause.append(" and astdt.documentCategory = '" + DocumentType + "'");
+      //@formatter:off
+      String whereClause = " as astdt "
+          + " where astdt.acctschemaTable.accountingSchema.id = "
+          + " '" + as.m_C_AcctSchema_ID + "'"
+          + "   and astdt.acctschemaTable.table.id = '" + AD_Table_ID + "'"
+          + "   and astdt.documentCategory = '" + DocumentType + "'";
+      //@formatter:on
 
       final OBQuery<AcctSchemaTableDocType> obqParameters = OBDal.getInstance()
-          .createQuery(AcctSchemaTableDocType.class, whereClause.toString());
+          .createQuery(AcctSchemaTableDocType.class, whereClause);
       final List<AcctSchemaTableDocType> acctSchemaTableDocTypes = obqParameters.list();
 
       if (acctSchemaTableDocTypes != null && acctSchemaTableDocTypes.size() > 0
@@ -101,14 +102,16 @@
       }
 
       if (strClassname.equals("")) {
-        final StringBuilder whereClause2 = new StringBuilder();
-
-        whereClause2.append(" as ast ");
-        whereClause2.append(" where ast.accountingSchema.id = '" + as.m_C_AcctSchema_ID + "'");
-        whereClause2.append(" and ast.table.id = '" + AD_Table_ID + "'");
+        //@formatter:off
+        String whereClause2 = " as ast "
+            + " where ast.accountingSchema.id = "
+            + " '" + as.m_C_AcctSchema_ID + "'"
+            + "   and ast.table.id = "
+            + " '" + AD_Table_ID + "'";
+        //@formatter:on
 
         final OBQuery<AcctSchemaTable> obqParameters2 = OBDal.getInstance()
-            .createQuery(AcctSchemaTable.class, whereClause2.toString());
+            .createQuery(AcctSchemaTable.class, whereClause2);
         final List<AcctSchemaTable> acctSchemaTables = obqParameters2.list();
         if (acctSchemaTables != null && acctSchemaTables.size() > 0
             && acctSchemaTables.get(0).getCreatefactTemplate() != null) {