IDEMPIERE-2284 MProductCategory/MAssetGroup s_cache useless
This commit is contained in:
parent
5b37a986c4
commit
1912d32e8d
|
@ -58,6 +58,8 @@ public class MAssetGroup extends X_A_Asset_Group
|
|||
ag = new MAssetGroup(ctx, A_Asset_Group_ID, null);
|
||||
if (ag != null && ag.get_ID() != A_Asset_Group_ID)
|
||||
ag = null;
|
||||
else
|
||||
s_cache.put(A_Asset_Group_ID, ag);
|
||||
//
|
||||
return ag;
|
||||
}
|
||||
|
|
|
@ -52,10 +52,13 @@ public class MProductCategory extends X_M_Product_Category
|
|||
public static MProductCategory get (Properties ctx, int M_Product_Category_ID)
|
||||
{
|
||||
Integer ii = new Integer (M_Product_Category_ID);
|
||||
MProductCategory pc = (MProductCategory)s_cache.get(ii);
|
||||
if (pc == null)
|
||||
pc = new MProductCategory (ctx, M_Product_Category_ID, null);
|
||||
return pc;
|
||||
MProductCategory retValue = (MProductCategory)s_cache.get(ii);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
retValue = new MProductCategory (ctx, M_Product_Category_ID, null);
|
||||
if (retValue.get_ID () != 0)
|
||||
s_cache.put (M_Product_Category_ID, retValue);
|
||||
return retValue;
|
||||
} // get
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue