//returns lookup description
public String getLookupDescription(String paramString1, String paramString2)
{
HashMap localHashMap = getLookupData(paramString1, paramString2);
if (null != localHashMap) {
return (String)localHashMap.get("DESCRIPTION");
}
return "";
}
//returns lookup meaning
public String getLookupMeaning(String paramString1, String paramString2)
{
HashMap localHashMap = getLookupData(paramString1, paramString2);
if (null != localHashMap) {
return (String)localHashMap.get("MEANING");
}
return "";
}
//returns HashMap for meaning and Description
public HashMap getLookupData(String paramString1, String paramString2)
{
if ((null == paramString1) || (null == paramString2)) {
return null;
}
ViewObject localViewObject1 = findViewObject("LookupDataVO");
if (null != localViewObject1) {
localViewObject1.remove();
}
OADBTransactionImpl localOADBTransactionImpl = (OADBTransactionImpl)getOADBTransaction();
String str1 = localOADBTransactionImpl.getCurrentLanguage();
String str2 = "select meaning, description from fnd_lookup_values where lookup_type = :1 and lookup_code = :2 and language = :3 ";
ViewObject localViewObject2 = createViewObjectFromQueryStmt("LookupDataVO", str2);
localViewObject2.setWhereClauseParam(0, paramString1);
localViewObject2.setWhereClauseParam(1, paramString2);
localViewObject2.setWhereClauseParam(2, str1);
Row localRow = localViewObject2.first();
HashMap localHashMap = new HashMap();
if (null != localRow)
{
localHashMap.put("MEANING", (String)localRow.getAttribute("MEANING"));
localHashMap.put("DESCRIPTION", (String)localRow.getAttribute("DESCRIPTION"));
}
else
{
localHashMap.put("MEANING", "");
localHashMap.put("DESCRIPTION", "");
}
localViewObject2.remove();
return localHashMap;
}
No comments:
Post a Comment