# HG changeset patch
# User Javier Armendáriz <javier.armendariz@openbravo.com>
# Date 1520434619 -3600
#      Wed Mar 07 15:56:59 2018 +0100
# Node ID 5ed1e967cbd28491799a60c3c433639492e4b8c2
# Parent  47941073c4da09c262f06f546bc6c41307262184
Fixed issue 37942: Removed deprecated code and removing all dep-ann warnings

Instead of adding the @Deprecated annotation, removed since its deprecated
for a long time and not used anywhere in the project.

diff --git a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java
@@ -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-2017 Openbravo SLU
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -483,13 +483,6 @@
       return menu;
     }
 
-    /**
-     * @deprecated Use instead setMenu(Menu menu, String userLanguageId)
-     */
-    public void setMenu(Menu menu) {
-      setMenu(menu, OBContext.getOBContext().getLanguage().getId());
-    }
-
     public void setMenu(Menu menu, String userLanguageId) {
       this.menu = menu;
       for (MenuTrl menuTrl : menu.getADMenuTrlList()) {
diff --git a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java
@@ -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) 2011-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2011-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -29,7 +29,6 @@
 import org.hibernate.Hibernate;
 import org.hibernate.Query;
 import org.openbravo.base.exception.OBException;
-import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.client.application.Parameter;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
@@ -45,7 +44,6 @@
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
-import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.userinterface.selector.Selector;
 import org.openbravo.userinterface.selector.SelectorField;
 import org.slf4j.Logger;
@@ -368,28 +366,6 @@
   }
 
   /**
-   * @deprecated use {@link #getComboTableData(Field)}
-   */
-  public ComboTableData getComboTableData(VariablesSecureApp vars, String ref, String colName,
-      String objectReference, String validation, String orgList, String clientList) {
-    String comboId = ref + colName + objectReference + validation + orgList + clientList;
-    if (useCache() && comboTableDataMap.get(comboId) != null) {
-      return comboTableDataMap.get(comboId);
-    }
-    ComboTableData comboTableData;
-    try {
-      comboTableData = new ComboTableData(vars, new DalConnectionProvider(false), ref, colName,
-          objectReference, validation, orgList, clientList, 0);
-    } catch (Exception e) {
-      throw new OBException("Error while computing combo table data for column " + colName, e);
-    }
-    if (useCache() && comboTableData.canBeCached()) {
-      comboTableDataMap.put(comboId, comboTableData);
-    }
-    return comboTableData;
-  }
-
-  /**
    * Returns the combo for the given field from cache if present, if not it also gets cached if
    * applicable.
    */
diff --git a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java
@@ -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) 2009-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -51,14 +51,6 @@
    * @deprecated use {@link #SKIN_PARAMETER}
    */
   public static final String SKIN_VERSION_PARAMETER = "_skinVersion";
-  /**
-   * @deprecated use {@link #SKIN_DEFAULT}
-   */
-  public static final String SKIN_VERSION_300 = "3.00";
-  /**
-   * @deprecated use {@link #SKIN_CLASSIC}
-   */
-  public static final String SKIN_VERSION_CLASSIC = "2.50_emulation";
 
   public static final String SKIN_PARAMETER = "_skinVersion";
   public static final String SKIN_DEFAULT = "Default";
diff --git a/src-test/src/org/openbravo/test/xml/ClientExportImportTest.java b/src-test/src/org/openbravo/test/xml/ClientExportImportTest.java
--- a/src-test/src/org/openbravo/test/xml/ClientExportImportTest.java
+++ b/src-test/src/org/openbravo/test/xml/ClientExportImportTest.java
@@ -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) 2008-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,38 +25,24 @@
 import static org.junit.Assert.fail;
 
 import java.io.File;
-import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.ddlutils.Platform;
 import org.apache.ddlutils.model.Database;
 import org.apache.ddlutils.model.Table;
 import org.apache.ddlutils.platform.ExcludeFilter;
-import org.hibernate.criterion.Restrictions;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.openbravo.base.exception.OBException;
-import org.openbravo.base.model.Entity;
-import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.base.structure.ClientEnabled;
-import org.openbravo.dal.security.OrganizationStructureProvider;
-import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
-import org.openbravo.dal.service.OBQuery;
 import org.openbravo.ddlutils.util.DBSMOBUtil;
 import org.openbravo.model.ad.system.Client;
-import org.openbravo.model.ad.utility.TreeNode;
-import org.openbravo.model.common.enterprise.Organization;
-import org.openbravo.model.financialmgmt.accounting.AccountingFact;
-import org.openbravo.model.financialmgmt.payment.DebtPayment;
-import org.openbravo.model.project.Project;
 import org.openbravo.service.db.ClientImportProcessor;
 import org.openbravo.service.db.DataExportService;
 import org.openbravo.service.db.DataImportService;
@@ -74,155 +60,6 @@
 // @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class ClientExportImportTest extends XMLBaseTest {
 
-  // public void _testImportReferenceData() throws Exception {
-  // setSystemAdministratorContext();
-  //
-  // final String sourcePath = OBPropertiesProvider.getInstance().getOpenbravoProperties()
-  // .getProperty("source.path");
-  // final File importDir = new File(sourcePath, "/referencedata/sampledata");
-  //
-  // for (final File importFile : importDir.listFiles()) {
-  // if (importFile.isDirectory()) {
-  // continue;
-  // }
-  // final ClientImportProcessor importProcessor = new ClientImportProcessor();
-  // importProcessor.setNewName(null);
-  // final ImportResult ir = DataImportService.getInstance().importClientData(importProcessor,
-  // false, new FileReader(importFile));
-  // if (ir.hasErrorOccured()) {
-  // if (ir.getException() != null) {
-  // throw new OBException(ir.getException());
-  // }
-  // if (ir.getErrorMessages() != null) {
-  // throw new OBException(ir.getErrorMessages());
-  // }
-  // }
-  // }
-  // }
-
-  /**
-   * Exports the "F&amp;B International Group" client and then imports as a new client. Has as side
-   * effect that a completely new client is added in the database.
-   * 
-   * Also tests mantis 8509: https://issues.openbravo.com/view.php?id=8509
-   * 
-   * Also tests mantis 9000: https://issues.openbravo.com/view.php?id=9000
-   */
-  @SuppressWarnings("deprecation")
-  @Ignore("This test has been temporarily disabled until the following issue related to the export client functionality is fixed: https://issues.openbravo.com/view.php?id=14848")
-  @Test
-  public void testExportImportClient1000000() {
-
-    // This test has been temporarily disabled until the following issue related to the export
-    // client functionality is fixed:
-    // https://issues.openbravo.com/view.php?id=14848
-    final String newClientId = exportImport(TEST_CLIENT_ID);
-    testMantis8509(newClientId);
-    testAccountingFactMantis9000(newClientId);
-    testTreeNodesMantis9000(newClientId);
-    SystemService.getInstance().removeAllClientData(newClientId);
-  }
-
-  private void testTreeNodesMantis9000(String newClientID) {
-    final OBQuery<TreeNode> nodes = OBDal.getInstance().createQuery(TreeNode.class,
-        "client.id='" + newClientID + "'");
-    nodes.setFilterOnReadableClients(false);
-    nodes.setFilterOnReadableOrganization(false);
-    assertTrue(nodes.list().size() > 0);
-    final Client newClient = OBDal.getInstance().get(Client.class, newClientID);
-
-    boolean testDoneAtLeastOnce = false;
-    for (TreeNode node : nodes.list()) {
-      assertEquals(newClient, node.getClient());
-      // also ignore 0 as there is a business partner/sales region tree node with 0
-      if (node.getNode() != null && !node.getNode().equals("0")) {
-        final Entity entity = ModelProvider.getInstance().getEntityFromTreeType(
-            node.getTree().getTypeArea());
-        if (entity.getName().equals(Project.ENTITY_NAME)) {
-          // can be removed when this issue:
-          // https://issues.openbravo.com/view.php?id=8745
-          // is solved
-          continue;
-        }
-
-        final BaseOBObject bob = OBDal.getInstance().get(entity.getName(), node.getNode());
-        assertTrue("Entity instance not found " + entity.getName() + " " + node.getNode(),
-            bob != null);
-        if (bob instanceof ClientEnabled) {
-          assertEquals(newClient, ((ClientEnabled) bob).getClient());
-          testDoneAtLeastOnce = true;
-        }
-      }
-      // also ignore 0 as there is a business partner/sales region tree node with 0
-      if (node.getReportSet() != null && !node.getReportSet().equals("0")) {
-        final Entity entity = ModelProvider.getInstance().getEntityFromTreeType(
-            node.getTree().getTypeArea());
-        if (entity.getName().equals(Project.ENTITY_NAME)) {
-          // can be removed when this issue:
-          // https://issues.openbravo.com/view.php?id=8745
-          // is solved
-          continue;
-        }
-
-        final BaseOBObject bob = OBDal.getInstance().get(entity.getName(), node.getReportSet());
-        assertTrue("Entity instance not found " + entity.getName() + " " + node.getReportSet(),
-            bob != null);
-        if (bob instanceof ClientEnabled) {
-          assertEquals(newClient, ((ClientEnabled) bob).getClient());
-          testDoneAtLeastOnce = true;
-        }
-      }
-    }
-    assertTrue(testDoneAtLeastOnce);
-  }
-
-  private void testAccountingFactMantis9000(String newClientID) {
-    final OBQuery<AccountingFact> facts = OBDal.getInstance().createQuery(AccountingFact.class,
-        "client.id='" + newClientID + "'");
-    facts.setFilterOnReadableClients(false);
-    facts.setFilterOnReadableOrganization(false);
-    assertTrue(facts.list().size() > 0);
-    final Client newClient = OBDal.getInstance().get(Client.class, newClientID);
-    boolean testDoneAtLeastOnce = false;
-    for (AccountingFact fact : facts.list()) {
-      assertEquals(newClient, fact.getClient());
-      if (fact.getRecordID() != null) {
-        final BaseOBObject bob = OBDal.getInstance().get(fact.getTable().getName(),
-            fact.getRecordID());
-        assertTrue(
-            "Entity instance not found " + fact.getTable().getName() + " " + fact.getRecordID(),
-            bob != null);
-        if (bob instanceof ClientEnabled) {
-          assertEquals(newClient, ((ClientEnabled) bob).getClient());
-          testDoneAtLeastOnce = true;
-        }
-      }
-      if (fact.getRecordID2() != null) {
-        final BaseOBObject bob = OBDal.getInstance().get(DebtPayment.ENTITY_NAME,
-            fact.getRecordID2());
-        assertTrue(
-            "Entity instance not found " + DebtPayment.ENTITY_NAME + " " + fact.getRecordID2(),
-            bob != null);
-        if (bob instanceof ClientEnabled) {
-          assertEquals(newClient, ((ClientEnabled) bob).getClient());
-          testDoneAtLeastOnce = true;
-        }
-      }
-    }
-    assertTrue(testDoneAtLeastOnce);
-  }
-
-  /**
-   * Exports the "QA Testing" client and then imports as a new client. Has as side effect that a
-   * completely new client is added in the database.
-   */
-  @Ignore("This test has been temporarily disabled.")
-  @Test
-  public void _testExportImportClient1000001() {
-    exportImport(QA_TEST_CLIENT_ID);
-    // SystemService.getInstance().removeAllClientData(newClientId);
-  }
-
   /**
    * Test which copies a client, then deletes it, and then tests that the foreign keys are still
    * activated
@@ -248,30 +85,6 @@
     }
   }
 
-  // tests mantis issue 8509 related to import of ad tree node as
-  // part of client import:
-  // 8509: References in the database without using foreign keys can go wrong in import
-  // https://issues.openbravo.com/view.php?id=8509
-  private void testMantis8509(String clientId) {
-    setSystemAdministratorContext();
-    final OrganizationStructureProvider osp = new OrganizationStructureProvider();
-    osp.setClientId(clientId);
-    final Client client = OBDal.getInstance().get(Client.class, clientId);
-    final OBCriteria<Organization> os = OBDal.getInstance().createCriteria(Organization.class);
-    os.setFilterOnReadableClients(false);
-    os.setFilterOnReadableOrganization(false);
-    os.setFilterOnActive(false);
-    os.add(Restrictions.eq("client", client));
-    for (Organization o : os.list()) {
-      final Set<String> naturalTree = osp.getNaturalTree(o.getId());
-      // all the organizations should at least have a tree of size 2
-      if (naturalTree.size() <= 1) {
-        fail("Naturaltree computation fails for organization " + o.getId() + " in imported client "
-            + clientId);
-      }
-    }
-  }
-
   private String exportImport(String clientId) {
     setSystemAdministratorContext();
     final Map<String, Object> parameters = new HashMap<String, Object>();
@@ -334,32 +147,4 @@
     }
   }
 
-  @Ignore("This test has been temporarily disabled.")
-  @Test
-  public void _testImportAccountingTest() {
-    doImport("Accounting_Test.xml");
-  }
-
-  private void doImport(String fileName) {
-    setSystemAdministratorContext();
-
-    final ClientImportProcessor importProcessor = new ClientImportProcessor();
-    try {
-      // final URL url = this.getClass().getResource("testdata/" + fileName);
-      // final File f = new File(new URI(url.toString()));
-
-      final File f = new File(fileName); // "/home/mtaal/mytmp/" +
-
-      final ImportResult ir = DataImportService.getInstance().importClientData(importProcessor,
-          false, new FileReader(f));
-      if (ir.getException() != null) {
-        throw new OBException(ir.getException());
-      }
-      if (ir.getErrorMessages() != null && ir.getErrorMessages().trim().length() > 0) {
-        fail(ir.getErrorMessages());
-      }
-    } catch (final Exception e) {
-      throw new OBException(e);
-    }
-  }
 }
diff --git a/src/org/openbravo/base/model/ModelProvider.java b/src/org/openbravo/base/model/ModelProvider.java
--- a/src/org/openbravo/base/model/ModelProvider.java
+++ b/src/org/openbravo/base/model/ModelProvider.java
@@ -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) 2008-2016 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -40,7 +40,6 @@
 import org.openbravo.base.ConnectionProviderContextListener;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.domaintype.BaseDomainType;
-import org.openbravo.base.model.domaintype.ForeignKeyDomainType;
 import org.openbravo.base.model.domaintype.OneToManyDomainType;
 import org.openbravo.base.model.domaintype.StringDomainType;
 import org.openbravo.base.provider.OBProvider;
@@ -217,11 +216,6 @@
       for (final Table t : dataSourceTablesByName.values()) {
         t.setReferenceTypes(ModelProvider.instance);
       }
-      //
-      // log.debug("Setting List Values for columns");
-      // for (final RefList rl : refList) {
-      // rl.setAllowedValue();
-      // }
 
       model = new ArrayList<Entity>();
       entitiesByName = new HashMap<String, Entity>();
@@ -1015,85 +1009,6 @@
   }
 
   /**
-   * @deprecated use {@link ForeignKeyDomainType#getForeignKeyColumn(String)}
-   */
-  protected Column getColumnByReference(String reference, String referenceValue,
-      char validationType, String columnName) throws CheckException {
-    Column c = null;
-
-    if (tablesByTableName == null)
-      getModel();
-
-    if (reference.equals(Reference.TABLEDIR)
-        || (reference.equals(Reference.SEARCH) && referenceValue.equals(Reference.NO_REFERENCE))
-        || reference.equals(Reference.IMAGE) || reference.equals(Reference.PRODUCT_ATTRIBUTE)
-        || reference.equals(Reference.RESOURCE_ASSIGNMENT)) {
-
-      // Removing _ID from tableName based on Openbravo's naming
-      // convention
-      String sTable = columnName.substring(0, columnName.length() - 3);
-
-      // TODO: solve references in the application dictionary
-      // Special Cases
-      if (sTable.equals("Ref_OrderLine"))
-        sTable = "C_OrderLine";
-
-      if (columnName.equals("C_Settlement_Cancel_ID")
-          || columnName.equals("C_Settlement_Generate_ID"))
-        sTable = "C_Settlement";
-
-      if (columnName.equals("Fact_Acct_Ref_ID"))
-        sTable = "Fact_Acct";
-
-      if (columnName.equals("Account_ID"))
-        sTable = "C_ElementValue";
-
-      if (columnName.equalsIgnoreCase("CreatedBy") || columnName.equalsIgnoreCase("UpdatedBy"))
-        sTable = "AD_User";
-
-      if (reference.equals(Reference.PRODUCT_ATTRIBUTE))
-        sTable = "M_AttributeSetInstance";
-
-      try {
-        c = getTable(sTable).getPrimaryKeyColumns().get(0);
-      } catch (final Exception e) {
-        e.printStackTrace();
-        Check.fail("Reference column for " + columnName + " not found in runtime model [ref: "
-            + reference + ", refval: " + referenceValue + "], encountered exception "
-            + e.getMessage());
-      }
-
-    } else if (reference.equals(Reference.TABLE)) {
-      if (validationType == Reference.TABLE_VALIDATION) {
-        final RefTable rt = refTableMap.get(referenceValue);
-        if (rt != null) {
-          c = rt.getColumn();
-        }
-      }
-    } else if (reference.equals(Reference.SEARCH) && !referenceValue.equals(Reference.NO_REFERENCE)) {
-      if (validationType == Reference.SEARCH_VALIDATION) {
-        final RefSearch rs = refSearchMap.get(referenceValue);
-        if (rs != null) {
-          c = rs.getColumn();
-        }
-      }
-    } else if (reference.equals(Reference.IMAGE_BLOB)) {
-      List<Column> columns = tablesByTableName.get("ad_image").getColumns();
-      for (Column acolumn : columns) {
-        if (acolumn.getColumnName().equalsIgnoreCase("AD_Image_Id")) {
-          c = acolumn;
-          break;
-        }
-      }
-    }
-    if (c == null) {
-      Check.fail("Reference column for " + columnName + " not found in runtime model [ref: "
-          + reference + ", refval: " + referenceValue + "]");
-    }
-    return c;
-  }
-
-  /**
    * Returns a reference instance from the org.openbravo.base.model package.
    * 
    * @param referenceId
diff --git a/src/org/openbravo/base/model/RefList.java b/src/org/openbravo/base/model/RefList.java
--- a/src/org/openbravo/base/model/RefList.java
+++ b/src/org/openbravo/base/model/RefList.java
@@ -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) 2008-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -58,10 +58,4 @@
     this.value = value;
   }
 
-  /**
-   * @deprecated functionality is now implemented in {@link #setReference(Reference)}
-   */
-  public void setAllowedValue() {
-  }
-
 }
diff --git a/src/org/openbravo/base/model/Reference.java b/src/org/openbravo/base/model/Reference.java
--- a/src/org/openbravo/base/model/Reference.java
+++ b/src/org/openbravo/base/model/Reference.java
@@ -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) 2008-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -23,17 +23,12 @@
 import java.sql.Timestamp;
 import java.util.Date;
 import java.util.HashMap;
-import java.util.Set;
 
 import org.apache.log4j.Logger;
 import org.openbravo.base.exception.OBException;
-import org.openbravo.base.model.domaintype.BaseEnumerateDomainType;
-import org.openbravo.base.model.domaintype.DateDomainType;
-import org.openbravo.base.model.domaintype.DatetimeDomainType;
 import org.openbravo.base.model.domaintype.DomainType;
 import org.openbravo.base.model.domaintype.PrimitiveDomainType;
 import org.openbravo.base.model.domaintype.StringDomainType;
-import org.openbravo.base.model.domaintype.StringEnumerateDomainType;
 import org.openbravo.base.util.OBClassLoader;
 
 /**
@@ -55,20 +50,6 @@
   public static final String PRODUCT_ATTRIBUTE = "35";
   public static final String NO_REFERENCE = "-1";
 
-  // Validation Types
-  /**
-   * @deprecated validation type is not used anymore
-   */
-  public static final char TABLE_VALIDATION = 'T';
-  /**
-   * @deprecated validation type is not used anymore
-   */
-  public static final char SEARCH_VALIDATION = 'S';
-  /**
-   * @deprecated validation type is not used anymore
-   */
-  public static final char LIST_VALIDATION = 'L';
-
   private static HashMap<String, Class<?>> primitiveTypes;
 
   static {
@@ -97,16 +78,6 @@
     primitiveTypes.put("800101", String.class);
   }
 
-  /**
-   * @deprecated use {@link PrimitiveDomainType#getPrimitiveType()}.
-   */
-  @SuppressWarnings({ "rawtypes" })
-  public static Class getPrimitiveType(String id) {
-    if (primitiveTypes.containsKey(id))
-      return primitiveTypes.get(id);
-    return Object.class;
-  }
-
   private String modelImpl;
   private DomainType domainType;
   private Reference parentReference;
@@ -175,48 +146,4 @@
     this.parentReference = parentReference;
   }
 
-  /**
-   * @deprecated validation type not used anymore, returns a space always
-   */
-  public char getValidationType() {
-    log.warn("The validation type concept is not used anymore. The Reference.getValidationType() method is deprecated");
-    return ' ';
-  }
-
-  /**
-   * @deprecated validation type not used anymore
-   */
-  public void setValidationType(char validationType) {
-  }
-
-  /**
-   * @deprecated check instance of {@link #getDomainType()}.
-   */
-  public boolean isDatetime() {
-    return getDomainType() instanceof DatetimeDomainType;
-  }
-
-  /**
-   * @deprecated check instance of {@link #getDomainType()}.
-   */
-  public boolean isDate() {
-    return getDomainType() instanceof DateDomainType;
-  }
-
-  /**
-   * @deprecated use {@link BaseEnumerateDomainType#addEnumerateValue(Object)}.
-   * @see #getDomainType()
-   */
-  public void addAllowedValue(String value) {
-    ((StringEnumerateDomainType) getDomainType()).addEnumerateValue(value);
-  }
-
-  /**
-   * @deprecated use {@link StringEnumerateDomainType#getEnumerateValues()}.
-   * @see #getDomainType()
-   */
-  public Set<String> getAllowedValues() {
-    return ((StringEnumerateDomainType) getDomainType()).getEnumerateValues();
-  }
-
 }
diff --git a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2001-2017 Openbravo S.L.U.
+ * Copyright (C) 2001-2018 Openbravo S.L.U.
  * Licensed under the Apache Software License version 2.0
  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to  in writing,  software  distributed
@@ -1115,13 +1115,6 @@
   }
 
   /**
-   * @deprecated use {@link HttpSecureAppServlet#readProperties(VariablesSecureApp)} instead
-   */
-  protected void readProperties(VariablesSecureApp vars, String strFileProperties) {
-    readProperties(vars);
-  }
-
-  /**
    * Reads some configuration properties from Openbravo.properties and sets them in session
    */
   protected void readProperties(VariablesSecureApp vars) {
diff --git a/src/org/openbravo/dal/xml/ModelXMLConverter.java b/src/org/openbravo/dal/xml/ModelXMLConverter.java
--- a/src/org/openbravo/dal/xml/ModelXMLConverter.java
+++ b/src/org/openbravo/dal/xml/ModelXMLConverter.java
@@ -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) 2008-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -188,20 +188,6 @@
     }
   }
 
-  /**
-   * @deprecated do not use this method anymore, the reference attributes are defined in the new
-   *             addReferenceType method
-   */
-  protected void addReferenceAttributes(Element elem) {
-    final Element complexElem = elem.addElement("xs:complexType");
-    complexElem.addElement("xs:attribute").addAttribute("name", "id")
-        .addAttribute("type", "xs:string").addAttribute("use", "optional");
-    complexElem.addElement("xs:attribute").addAttribute("name", "entityName")
-        .addAttribute("type", "xs:string").addAttribute("use", "optional");
-    complexElem.addElement("xs:attribute").addAttribute("name", "identifier")
-        .addAttribute("type", "xs:string").addAttribute("use", "optional");
-  }
-
   private void addReferenceType(Element schemaElement) {
     final Element complexElem = schemaElement.addElement("xs:complexType").addAttribute("name",
         "ReferenceType");
diff --git a/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java b/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
--- a/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
+++ b/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
@@ -676,15 +676,6 @@
   }
 
   /**
-   * @deprecated use {@link #isLoginPopupRequired(VariablesSecureApp, ConnectionProvider)}
-   */
-  public static HeartBeatOrRegistration showHeartBeatOrRegistration(VariablesSecureApp vars,
-      ConnectionProvider connectionProvider) throws ServletException {
-
-    return isLoginPopupRequired(vars, connectionProvider);
-  }
-
-  /**
    * @see HeartbeatProcess#isLoginPopupRequired(String, String, ConnectionProvider)
    */
   public static HeartBeatOrRegistration isLoginPopupRequired(VariablesSecureApp vars,
diff --git a/src/org/openbravo/erpCommon/modules/ImportModule.java b/src/org/openbravo/erpCommon/modules/ImportModule.java
--- a/src/org/openbravo/erpCommon/modules/ImportModule.java
+++ b/src/org/openbravo/erpCommon/modules/ImportModule.java
@@ -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) 2008-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -175,19 +175,6 @@
   }
 
   /**
-   * Check the dependencies for a file name. See
-   * {@link #checkDependenciesId(String[], String[], HashMap)}.
-   * 
-   * @deprecated not used
-   */
-  public boolean checkDependenciesFileName(String fileName) throws Exception {
-    final File file = new File(fileName);
-    if (!file.exists())
-      throw new Exception("File " + fileName + " do not exist!");
-    return checkDependenciesFile(new FileInputStream(file));
-  }
-
-  /**
    * Checks whether the given .obx InputStream contains an update to an already installed version.
    * 
    * @param is
@@ -394,17 +381,6 @@
   }
 
   /**
-   * @deprecated Use {@link ImportModule#checkDependenciesId(String[], String[], HashMap)} instead
-   */
-  public boolean checkDependenciesId(String[] installableModules, String[] updateableModules)
-      throws Exception {
-    HashMap<String, String> maturityLevels = new HashMap<String, String>();
-    maturityLevels.put("update.level", "500");
-    maturityLevels.put("install.level", "500");
-    return checkDependenciesId(installableModules, updateableModules, maturityLevels);
-  }
-
-  /**
    * Executes the modules installation, first one of the checkDependencies method should have been
    * called in order to set the installable and updateable modules.
    * 
@@ -1767,30 +1743,6 @@
   }
 
   /**
-   * Returns the current installed modules with its version
-   * 
-   * @deprecated use {@link ImportModule#getInstalledModulesAndDeps} instead
-   * @param conn
-   *          ConnectionProvider needed as it is a static method
-   * @return HashMap&lt;String,String&gt; -&gt; &lt;ModuleId, VersionNo&gt;
-   */
-  public static HashMap<String, String> getInstalledModules(ConnectionProvider conn) {
-    final HashMap<String, String> rt = new HashMap<String, String>();
-    ImportModuleData data[] = null;
-    try {
-      data = ImportModuleData.selectInstalled(conn);
-    } catch (final Exception e) {
-      log4j.error("Error getting installed modules", e);
-    }
-    if (data != null) {
-      for (int i = 0; i < data.length; i++) {
-        rt.put(data[i].adModuleId, data[i].version);
-      }
-    }
-    return rt;
-  }
-
-  /**
    * Returns the current installed modules with its version (with the exception of those which are
    * marked for deinstallation)
    * 
diff --git a/src/org/openbravo/erpCommon/modules/ImportModule_data.xsql b/src/org/openbravo/erpCommon/modules/ImportModule_data.xsql
--- a/src/org/openbravo/erpCommon/modules/ImportModule_data.xsql
+++ b/src/org/openbravo/erpCommon/modules/ImportModule_data.xsql
@@ -12,7 +12,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) 2008-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -20,23 +20,16 @@
 
 
 <SqlClass name="ImportModuleData" package="org.openbravo.erpCommon.modules">
-   <SqlMethod name="selectInstalled" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT M.AD_MODULE_ID, 
-               COALESCE(MI.VERSION, M.VERSION) AS VERSION, 
-               COALESCE(MI.NAME, M.NAME) AS NAME, 
-               '' AS TOTAL, '' AS JAVAPACKAGE
-         FROM AD_MODULE M LEFT JOIN AD_MODULE_INSTALL MI
-                                 ON MI.AD_MODULE_ID = M.AD_MODULE_ID
-        UNION
-        SELECT M.AD_MODULE_ID, 
-               M.VERSION, 
-               M.NAME, 
-               '' AS TOTAL, '' AS JAVAPACKAGE
-         FROM AD_MODULE_INSTALL M
-      </Sql>
-   </SqlMethod>
+
+     <SqlMethod name="getModule" type="preparedStatement" return="single">
+         <Sql>
+            SELECT JAVAPACKAGE, VERSION
+              FROM AD_MODULE
+             WHERE AD_MODULE_ID = ?
+         </Sql>
+         <Parameter name="mouleId"/> 
+     </SqlMethod>
+
    <SqlMethod name="selectVersion" type="preparedStatement" return="string">
       <SqlMethodComment></SqlMethodComment>
       <Sql>
@@ -239,13 +232,5 @@
          <Parameter name="mouleId"/> 
      </SqlMethod>
      
-     <SqlMethod name="getModule" type="preparedStatement" return="single">
-         <Sql>
-            SELECT JAVAPACKAGE, VERSION
-              FROM AD_MODULE
-             WHERE AD_MODULE_ID = ?
-         </Sql>
-         <Parameter name="mouleId"/> 
-     </SqlMethod>
 </SqlClass>
 
diff --git a/src/org/openbravo/erpCommon/modules/VersionUtility.java b/src/org/openbravo/erpCommon/modules/VersionUtility.java
--- a/src/org/openbravo/erpCommon/modules/VersionUtility.java
+++ b/src/org/openbravo/erpCommon/modules/VersionUtility.java
@@ -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) 2008-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -672,19 +672,6 @@
   }
 
   /**
-   * @deprecated use
-   *             {@link VersionUtility#checkRemote(VariablesSecureApp, String[], String[], OBError, HashMap)}
-   *             instead
-   */
-  static public ModuleInstallDetail checkRemote(VariablesSecureApp vars, String[] moduleVersionId,
-      String[] moduleVersionToUpdateId, OBError obErrors) throws Exception {
-    HashMap<String, String> maturityLevels = new HashMap<String, String>();
-    maturityLevels.put("update.level", "500");
-    maturityLevels.put("install.level", "500");
-    return checkRemote(vars, moduleVersionId, moduleVersionToUpdateId, obErrors, maturityLevels);
-  }
-
-  /**
    * 
    * check the dependencies to install new modules locally, without connecting to central repository
    * 
@@ -711,24 +698,6 @@
     return checked;
   }
 
-  /**
-   * @deprecated use
-   *             {@link VersionUtility#checkLocal(VariablesSecureApp, Module[], Module[], Module[], OBError)}
-   */
-  static public boolean checkLocal(VariablesSecureApp vars, Module[] modulesToInstall,
-      Module[] modulesToUpdate, OBError obErrors) throws Exception {
-    return checkLocal(vars, modulesToInstall, null, null, obErrors);
-  }
-
-  /**
-   * @deprecated use
-   *             {@link VersionUtility#checkLocal(VariablesSecureApp, Module[], Module[], Module[], OBError)}
-   */
-  static public boolean checkLocal(VariablesSecureApp vars, Module[] modulesToInstall,
-      OBError obErrors) throws Exception {
-    return checkLocal(vars, modulesToInstall, null, null, obErrors);
-  }
-
   static public void setPool(ConnectionProvider cp) {
     pool = cp;
   }
diff --git a/src/org/openbravo/erpCommon/obps/ActivationKey.java b/src/org/openbravo/erpCommon/obps/ActivationKey.java
--- a/src/org/openbravo/erpCommon/obps/ActivationKey.java
+++ b/src/org/openbravo/erpCommon/obps/ActivationKey.java
@@ -321,15 +321,7 @@
     return instance;
   }
 
-  /**
-   * ActivationKey constructor, this should not be used. ActivationKey should be treated as
-   * Singleton, so the {@link ActivationKey#getInstance()} method should be used instead.
-   * <p/>
-   * This constructor is public to maintain backwards compatibility.
-   * 
-   * @deprecated
-   */
-  public ActivationKey() {
+  private ActivationKey() {
     loadFromDB();
   }
 
diff --git a/src/org/openbravo/erpCommon/security/SessionLogin.java b/src/org/openbravo/erpCommon/security/SessionLogin.java
--- a/src/org/openbravo/erpCommon/security/SessionLogin.java
+++ b/src/org/openbravo/erpCommon/security/SessionLogin.java
@@ -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) 2001-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -165,13 +165,6 @@
     }
   }
 
-  /**
-   * @deprecated use save() instead
-   */
-  public int save(ConnectionProvider conn) throws ServletException {
-    return save();
-  }
-
   public void update(ConnectionProvider conn) throws ServletException {
     try {
       OBContext.setAdminMode();
diff --git a/src/org/openbravo/erpCommon/utility/HttpsUtils.java b/src/org/openbravo/erpCommon/utility/HttpsUtils.java
--- a/src/org/openbravo/erpCommon/utility/HttpsUtils.java
+++ b/src/org/openbravo/erpCommon/utility/HttpsUtils.java
@@ -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) 2006-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2006-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -23,12 +23,10 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
 import java.net.Authenticator;
 import java.net.HttpURLConnection;
 import java.net.PasswordAuthentication;
 import java.net.URL;
-import java.net.URLEncoder;
 import java.security.GeneralSecurityException;
 import java.security.KeyStoreException;
 
@@ -103,61 +101,6 @@
   }
 
   /**
-   * @deprecated use {@link #sendSecure(URL, String)}
-   */
-  public static String sendSecure(URL url, String data, String alias, String passphrase)
-      throws GeneralSecurityException, IOException {
-    return sendSecure(url, data);
-  }
-
-  /**
-   * @deprecated use {@link #sendHttpsRequest(URL, String)}
-   */
-  public static HttpURLConnection sendHttpsRequest(URL url, String data, String alias,
-      String passphrase) throws GeneralSecurityException, IOException {
-    return sendHttpsRequest(url, data);
-  }
-
-  /**
-   * @deprecated use {@link #getHttpsConn(URL)}
-   */
-  public static HttpsURLConnection getHttpsConn(URL url, String alias, String passphrase)
-      throws KeyStoreException, GeneralSecurityException, IOException {
-    return getHttpsConn(url);
-  }
-
-  /**
-   * @deprecated
-   * 
-   *             This method tries to URLEncode a queryString. It splits the query in chunks
-   *             separated by &amp; assuming &amp; symbol is not part of the values. But in case a value
-   *             contains this symbol it does not work (issue #18405).
-   * 
-   *             Do not use this method, instead encode each of the values in the query.
-   */
-  public static String encode(String queryStr, String encoding) {
-    StringBuilder sb = new StringBuilder();
-    String[] ss = queryStr.split("&");
-    for (String s : ss) {
-      String key = s.split("=")[0];
-      String value = "";
-      try {
-        value = s.split("=")[1];
-      } catch (IndexOutOfBoundsException e) {
-        // Do nothing - value is an empty string
-      }
-      try {
-        value = URLEncoder.encode(value, encoding);
-      } catch (UnsupportedEncodingException e) {
-        log4j.error(e.getMessage(), e);
-        // Shouldn't happen. Openbravo only using UTF-8
-      }
-      sb.append(key + "=" + value + "&");
-    }
-    return sb.toString();
-  }
-
-  /**
    * Checks Internet availability. In case system information is defined to use proxy, proxy is set.
    * Therefore this method should be invoked before each Internet connection.
    * 
@@ -170,12 +113,10 @@
   /**
    * Checks the Internet availability and sets the proxy in case it is needed.
    * 
-   * @deprecated Proxy settings should not be passed as parameter, but obtained from system
-   *             information. Use instead {@link HttpsUtils#isInternetAvailable()}
    * @param proxyHost
    * @param proxyPort
    */
-  public static boolean isInternetAvailable(String proxyHost, int proxyPort) {
+  private static boolean isInternetAvailable(String proxyHost, int proxyPort) {
     OBContext.setAdminMode();
     try {
       final SystemInformation sys = OBDal.getInstance().get(SystemInformation.class, "0");
diff --git a/src/org/openbravo/erpCommon/utility/SequenceIdData.java b/src/org/openbravo/erpCommon/utility/SequenceIdData.java
--- a/src/org/openbravo/erpCommon/utility/SequenceIdData.java
+++ b/src/org/openbravo/erpCommon/utility/SequenceIdData.java
@@ -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) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -19,11 +19,8 @@
 
 package org.openbravo.erpCommon.utility;
 
-import java.sql.Connection;
 import java.util.UUID;
 
-import org.openbravo.database.ConnectionProvider;
-
 public class SequenceIdData {
 
   /**
@@ -35,24 +32,4 @@
     return UUID.randomUUID().toString().replace("-", "").toUpperCase();
   }
 
-  /**
-   * Get the sequence for the specified table this shouldn't be used anymore, use instead getUUID()
-   * It is deprecated and will be removed before the 2.60 release
-   * 
-   * @deprecated
-   */
-  public static String getSequence(ConnectionProvider conn, String table, String client) {
-    return getUUID();
-  }
-
-  /**
-   * Get the sequence for the specified table. It is deprecated and will be removed before the 2.60
-   * release
-   * 
-   * @deprecated
-   */
-  public static String getSequenceConnection(Connection conn, ConnectionProvider con, String table,
-      String client) {
-    return getUUID();
-  }
 }
diff --git a/src/org/openbravo/service/system/SystemService.java b/src/org/openbravo/service/system/SystemService.java
--- a/src/org/openbravo/service/system/SystemService.java
+++ b/src/org/openbravo/service/system/SystemService.java
@@ -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) 2009-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -39,21 +39,17 @@
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
-import org.openbravo.base.model.Property;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.provider.OBSingleton;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.dal.core.OBContext;
-import org.openbravo.dal.core.SessionHandler;
-import org.openbravo.dal.core.TriggerHandler;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.ddlutils.task.DatabaseUtils;
 import org.openbravo.ddlutils.util.DBSMOBUtil;
 import org.openbravo.model.ad.module.Module;
 import org.openbravo.model.ad.system.Client;
-import org.openbravo.model.ad.system.ClientInformation;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.scheduling.OBScheduler;
 import org.openbravo.service.system.SystemValidationResult.SystemValidationType;
@@ -175,125 +171,6 @@
   }
 
   /**
-   * Removes all data of a specific {@link Client}, the client is identified by the clientId
-   * parameter.
-   * 
-   * NOTE: this method does not work yet. It is an initial implementation and not yet complete
-   * 
-   * @param clientId
-   *          the id of the client to delete.
-   * @deprecated Do not use, is a work in progress
-   */
-  public void removeAllClientData(String clientId) {
-    // the idea was/is the following:
-    // 0) compute the order of all entities based on their reference, something like the
-    // low-level code in BOM computations: the entity nobody refers to has number 0, the
-    // rule is that if there are two entities A and B and there is a reference path from A
-    // to B (directly or through other entities) using only non-mandatory many-to-one references
-    // then: A.referenceNumber < B.referenceNumber
-    // Then the entities can be sorted ascending on the referenceNumber
-    // the procedure is then:
-    // 1) nullify all non-mandatory many-to-ones
-    // 2) then remove the objects in order of the entity.referenceNumber
-    // currently this does not work yet because step 1 fails because there are constraints
-    // defined in the database which means that certain fields are conditionally mandatory.
-
-    OBContext.setAdminMode();
-    try {
-      TriggerHandler.getInstance().disable();
-      final Client client = OBDal.getInstance().get(Client.class, clientId);
-      for (Entity e : ModelProvider.getInstance().getModel()) {
-        if (!e.isClientEnabled()) {
-          continue;
-        }
-        nullifyManyToOnes(e, client);
-      }
-      OBDal.getInstance().flush();
-
-      for (Entity e : ModelProvider.getInstance().getModel()) {
-        if (!e.isClientEnabled()) {
-          continue;
-        }
-        final String hql;
-        if (e.getName().equals(ClientInformation.ENTITY_NAME)) {
-          hql = "delete " + e.getName() + " where id=:clientId";
-        } else {
-          hql = "delete " + e.getName() + " where client=:clientId";
-        }
-        SessionHandler.getInstance().getSession().createQuery(hql).setString("clientId", clientId)
-            .executeUpdate();
-      }
-      OBDal.getInstance().flush();
-      TriggerHandler.getInstance().enable();
-      OBDal.getInstance().commitAndClose();
-    } finally {
-      // always clear the threadlocal
-      TriggerHandler.getInstance().clear();
-      OBContext.restorePreviousMode();
-    }
-  }
-
-  private void nullifyManyToOnes(Entity e, Client client) {
-    final String updatePart = createNullifyNonMandatoryQuery(e);
-    if (updatePart == null) {
-      return;
-    }
-    final String hql;
-    if (e.getName().equals(ClientInformation.ENTITY_NAME)) {
-      hql = updatePart + " where id=:clientId";
-    } else {
-      hql = updatePart + " where client=:clientId";
-    }
-    try {
-      SessionHandler.getInstance().getSession().createQuery(hql)
-          .setString("clientId", client.getId()).executeUpdate();
-    } catch (IllegalArgumentException ex) {
-      // handle a special case, that the entity name or a property name
-      // is a reserved hql word.
-      if (ex.getMessage().indexOf("node to traverse cannot be null") != -1) {
-        // in this case use an inefficient method
-        nullifyPerObject(e, client);
-      } else {
-        throw ex;
-      }
-    }
-  }
-
-  private String createNullifyNonMandatoryQuery(Entity e) {
-    final StringBuilder sb = new StringBuilder("update " + e.getClassName() + " e set ");
-    boolean doNullifyProperty = false;
-    for (Property p : e.getProperties()) {
-      if (!p.isPrimitive() && !p.isOneToMany() && !p.isMandatory()) {
-        if (doNullifyProperty) {
-          sb.append(", ");
-        }
-        sb.append("e." + p.getName() + " = null");
-        doNullifyProperty = true;
-      }
-    }
-    // no property found, don't do update
-    if (!doNullifyProperty) {
-      return null;
-    }
-    return sb.toString();
-  }
-
-  private void nullifyPerObject(Entity e, Client client) {
-    final OBCriteria<BaseOBObject> obc = OBDal.getInstance().createCriteria(e.getName());
-    obc.setFilterOnActive(false);
-    obc.setFilterOnReadableClients(false);
-    obc.setFilterOnReadableOrganization(false);
-    obc.add(Restrictions.eq(Organization.PROPERTY_CLIENT, client));
-    for (BaseOBObject bob : obc.list()) {
-      for (Property p : e.getProperties()) {
-        if (!p.isPrimitive() && !p.isOneToMany() && !p.isMandatory()) {
-          bob.set(p.getName(), null);
-        }
-      }
-    }
-  }
-
-  /**
    * This process deletes a client from the database. During its execution, the Scheduler is
    * stopped, and all sessions active for other users are cancelled
    * 
# HG changeset patch
# User Javier Armendáriz <javier.armendariz@openbravo.com>
# Date 1520434622 -3600
#      Wed Mar 07 15:57:02 2018 +0100
# Node ID 2eda14238e73c7cf922a43c5981fbd5fd19f59e7
# Parent  5ed1e967cbd28491799a60c3c433639492e4b8c2
Related to issue 37942: Removed deprecated code and removing dep-ann warnings

Marking code that cannot be removed with the @Deprecated annotation. These
methods are being used in modules in the Forge.

diff --git a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelConstants.java
@@ -50,6 +50,7 @@
   /**
    * @deprecated use {@link #SKIN_PARAMETER}
    */
+  @Deprecated
   public static final String SKIN_VERSION_PARAMETER = "_skinVersion";
 
   public static final String SKIN_PARAMETER = "_skinVersion";
diff --git a/src/org/openbravo/scheduling/ProcessBundle.java b/src/org/openbravo/scheduling/ProcessBundle.java
--- a/src/org/openbravo/scheduling/ProcessBundle.java
+++ b/src/org/openbravo/scheduling/ProcessBundle.java
@@ -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) 2008-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -246,6 +246,7 @@
    * 
    * @deprecated Use instead {@link #getParamsDeflated()}
    */
+  @Deprecated
   public String getParamsDefalated() {
     return this.getParamsDeflated();
   }
