related to issue 40015: apply new Java formatting
authorCarlos Aristu <carlos.aristu@openbravo.com>
Thu, 24 Jan 2019 10:54:34 +0100
changeset 35322 699f8e73b89f
parent 35321 19597fe81cd7
child 35323 4ab5cd94e65e
related to issue 40015: apply new Java formatting
modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java	Tue Jan 15 13:57:46 2019 +0100
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java	Thu Jan 24 10:54:34 2019 +0100
@@ -149,16 +149,16 @@
       aboutFieldDefinitions.put(MODULEDBPREFIX, moduleDBPrefixList);
       aboutFieldDefinitions.put(MODULELICENSETYPE, widgetClass.getModule().getLicenseType());
       aboutFieldDefinitions.put(MODULEUPDATEINFO,
-          widgetClass.getModule().getUpdateInformation() == null ? "" : widgetClass.getModule()
-              .getUpdateInformation());
+          widgetClass.getModule().getUpdateInformation() == null ? ""
+              : widgetClass.getModule().getUpdateInformation());
       aboutFieldDefinitions.put(MODULELICENSETEXT,
-          widgetClass.getModule().getLicenseText() == null ? "" : widgetClass.getModule()
-              .getLicenseText());
-      aboutFieldDefinitions.put(MODULEAUTHOR, widgetClass.getModule().getAuthor() == null ? ""
-          : widgetClass.getModule().getAuthor());
+          widgetClass.getModule().getLicenseText() == null ? ""
+              : widgetClass.getModule().getLicenseText());
+      aboutFieldDefinitions.put(MODULEAUTHOR,
+          widgetClass.getModule().getAuthor() == null ? "" : widgetClass.getModule().getAuthor());
       aboutFieldDefinitions.put(TITLE, MyOBUtils.getWidgetTitle(widgetClass));
-      aboutFieldDefinitions.put(DESCRIPTION, widgetClass.getDescription() == null ? ""
-          : widgetClass.getDescription());
+      aboutFieldDefinitions.put(DESCRIPTION,
+          widgetClass.getDescription() == null ? "" : widgetClass.getDescription());
       aboutFieldDefinitions.put(SUPERCLASSTITLE, widgetClass.getWidgetSuperclass() == null ? ""
           : MyOBUtils.getWidgetTitle(widgetClass.getWidgetSuperclass()));
       aboutFieldDefinitions.put(DATAACCESSLEVEL, widgetClass.getDataAccessLevel());
@@ -199,11 +199,12 @@
         } else {
           reference = parameter.getReference();
         }
-        if (reference.getName().equals("Text") || reference.getName().equals("Memo"))
+        if (reference.getName().equals("Text") || reference.getName().equals("Memo")) {
           fieldDefinition.put(PARAMETERCOLSPAN, 2);
+        }
 
-        final UIDefinition uiDefinition = UIDefinitionController.getInstance().getUIDefinition(
-            reference);
+        final UIDefinition uiDefinition = UIDefinitionController.getInstance()
+            .getUIDefinition(reference);
         fieldDefinition.put(PARAMETERTYPE, uiDefinition.getName());
 
         try {
@@ -328,8 +329,8 @@
   private static Object getComboBoxData(Reference reference) {
     OBContext.setAdminMode();
     try {
-      final UIDefinition uiDefinition = UIDefinitionController.getInstance().getUIDefinition(
-          reference);
+      final UIDefinition uiDefinition = UIDefinitionController.getInstance()
+          .getUIDefinition(reference);
 
       if (uiDefinition instanceof EnumUIDefinition) {
         return getComboBoxData((EnumUIDefinition) uiDefinition);
@@ -347,7 +348,8 @@
 
   private static Object getComboBoxData(FKComboUIDefinition fkComboUIDefinition) throws Exception {
     // FIXME: Revisit this method later. Not all foreign keys have a ADReferenceTable.
-    final ReferencedTable refTable = fkComboUIDefinition.getReference().getADReferencedTableList()
+    final ReferencedTable refTable = fkComboUIDefinition.getReference()
+        .getADReferencedTableList()
         .get(0);
     final Entity entity = ModelProvider.getInstance().getEntity(refTable.getTable().getName());
 
@@ -376,19 +378,18 @@
       }
       orderBy = sb.toString();
     }
-    final String whereOrderByClause = (refTable.getHqlwhereclause() != null ? refTable
-        .getHqlwhereclause() : "") + " order by " + orderBy;
-    final OBQuery<BaseOBObject> obQuery = OBDal.getInstance().createQuery(entity.getName(),
-        whereOrderByClause);
+    final String whereOrderByClause = (refTable.getHqlwhereclause() != null
+        ? refTable.getHqlwhereclause()
+        : "") + " order by " + orderBy;
+    final OBQuery<BaseOBObject> obQuery = OBDal.getInstance()
+        .createQuery(entity.getName(), whereOrderByClause);
     final List<JSONObject> values = new ArrayList<JSONObject>();
     for (BaseOBObject bob : obQuery.list()) {
       final JSONObject dataJSONObject = new JSONObject();
       dataJSONObject.put(JsonConstants.ID, bob.getId());
-      dataJSONObject
-          .put(
-              JsonConstants.IDENTIFIER,
-              (displayProperty != null ? bob.getValue(displayProperty.getName()) : bob
-                  .getIdentifier()));
+      dataJSONObject.put(JsonConstants.IDENTIFIER,
+          (displayProperty != null ? bob.getValue(displayProperty.getName())
+              : bob.getIdentifier()));
       values.add(dataJSONObject);
     }
     return values;
@@ -417,7 +418,8 @@
     }
 
     final String readReferenceHql = "select searchKey, name from ADList where reference.id=:referenceId";
-    final Query<Object[]> readReferenceQry = OBDal.getInstance().getSession()
+    final Query<Object[]> readReferenceQry = OBDal.getInstance()
+        .getSession()
         .createQuery(readReferenceHql, Object[].class);
     readReferenceQry.setParameter("referenceId", referenceId);
     for (Object[] row : readReferenceQry.list()) {