From bcc4bdbc5461a8afb750c8f533011ff301f1d0fd Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Wed, 16 Jul 2014 09:26:15 -0500 Subject: [PATCH] IDEMPIERE-2062 Add methods for MRefList for getting translation with specific language (and not ctx) --- .../src/org/compiere/model/MRefList.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MRefList.java b/org.adempiere.base/src/org/compiere/model/MRefList.java index f3d5916086..b5e046f198 100644 --- a/org.adempiere.base/src/org/compiere/model/MRefList.java +++ b/org.adempiere.base/src/org/compiere/model/MRefList.java @@ -44,7 +44,7 @@ public class MRefList extends X_AD_Ref_List /** * */ - private static final long serialVersionUID = -6948532574960232289L; + private static final long serialVersionUID = 2210328198547927123L; /** @@ -61,7 +61,7 @@ public class MRefList extends X_AD_Ref_List .setParameters(AD_Reference_ID, Value) .firstOnly(); } // get - + /** * Get Reference List Value Name (cached) * @param ctx context @@ -72,6 +72,18 @@ public class MRefList extends X_AD_Ref_List public static String getListName (Properties ctx, int AD_Reference_ID, String Value) { String AD_Language = Env.getAD_Language(ctx); + return getListName (AD_Language, AD_Reference_ID, Value); + } + + /** + * Get Reference List Value Name (cached) + * @param Language + * @param AD_Reference_ID reference + * @param Value value + * @return List or "" + */ + public static String getListName (String AD_Language, int AD_Reference_ID, String Value) + { String key = AD_Language + "_" + AD_Reference_ID + "_" + Value; String retValue = (String)s_cache.get(key); if (retValue != null)