IDEMPIERE-2062 Add methods for MRefList for getting translation with specific language (and not ctx)

This commit is contained in:
Nicolas Micoud 2014-07-16 09:26:15 -05:00
parent 4b4e41a3ab
commit bcc4bdbc54
1 changed files with 14 additions and 2 deletions

View File

@ -44,7 +44,7 @@ public class MRefList extends X_AD_Ref_List
/**
*
*/
private static final long serialVersionUID = -6948532574960232289L;
private static final long serialVersionUID = 2210328198547927123L;
/**
@ -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)