- add retrieval by name convenient method.
This commit is contained in:
Heng Sin Low 2007-07-16 03:42:35 +00:00
parent 4f834f8a05
commit 8630cd1d11
1 changed files with 15 additions and 0 deletions

View File

@ -128,6 +128,21 @@ public class MUOM extends X_C_UOM
return uom; return uom;
} // getUOMfromCache } // getUOMfromCache
/**
* Get UOM by name
* @param ctx
* @param name
* @param trxName
* @return MUOM if found, null if not found
*/
public static MUOM get(Properties ctx, String name, String trxName)
{
MTable table = MTable.get(Env.getCtx(), Table_ID);
MUOM uom = (MUOM)table.getPO("Name = ?", new Object[]{name}, trxName);
return uom;
}
/** /**
* Get Precision * Get Precision
* @param ctx context * @param ctx context