Related to issue 19778.Update methods moved to MessageUtility.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Wed, 15 Feb 2012 12:30:18 +0100
changeset 15657 7cd1c7e2ee90
parent 15656 1eb3550e1a22
child 15658 0b5892a647e9
Related to issue 19778.Update methods moved to MessageUtility.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Wed Feb 15 12:30:11 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Wed Feb 15 12:30:18 2012 +0100
@@ -49,9 +49,9 @@
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
-import org.openbravo.database.ConnectionProvider;
 import org.openbravo.erpCommon.utility.DateUtility;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
+import org.openbravo.erpCommon.utility.MessageUtility;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.ad.utility.Sequence;
@@ -68,7 +68,6 @@
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 import org.openbravo.service.db.CallStoredProcedure;
-import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.utils.Replace;
 
 public class FIN_Utility {
@@ -584,17 +583,10 @@
   }
 
   /**
-   * Translate the given code into some message from the application dictionary. It searches first
-   * in AD_Message table and if there are not matchings then in AD_Element table.
-   * 
-   * @param strCode
-   *          String with the search key to search.
-   * @return String with the translated message.
+   * @see MessageUtility#messageBD(String)
    */
   public static String messageBD(String strCode) {
-    String language = OBContext.getOBContext().getLanguage().getLanguage();
-    ConnectionProvider conn = new DalConnectionProvider(false);
-    return Utility.messageBD(conn, strCode, language);
+    return MessageUtility.messageBD(strCode);
   }
 
   /**