IDEMPIERE-5006 [Info Window] - MInfoProcess & MInfoRelated cached incorrectly (#1015)
This commit is contained in:
parent
fa99e4d89f
commit
0e58458114
|
@ -34,7 +34,7 @@ import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.Util;
|
import org.compiere.util.Util;
|
||||||
import org.idempiere.cache.ImmutableIntPOCache;
|
import org.idempiere.cache.ImmutablePOCache;
|
||||||
import org.idempiere.cache.ImmutablePOSupport;
|
import org.idempiere.cache.ImmutablePOSupport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +51,7 @@ public class MInfoWindow extends X_AD_InfoWindow implements ImmutablePOSupport
|
||||||
private static final long serialVersionUID = 6723480469706009814L;
|
private static final long serialVersionUID = 6723480469706009814L;
|
||||||
|
|
||||||
/** Cache */
|
/** Cache */
|
||||||
private static ImmutableIntPOCache<Integer,MInfoWindow> s_cache = new ImmutableIntPOCache<Integer,MInfoWindow>(Table_Name, 20);
|
private static ImmutablePOCache<String,MInfoWindow> s_cache = new ImmutablePOCache<String,MInfoWindow>(Table_Name, 20);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard Constructor
|
* Standard Constructor
|
||||||
|
@ -124,7 +124,7 @@ public class MInfoWindow extends X_AD_InfoWindow implements ImmutablePOSupport
|
||||||
*/
|
*/
|
||||||
public static MInfoWindow getInfoWindow(int AD_InfoWindow_ID) {
|
public static MInfoWindow getInfoWindow(int AD_InfoWindow_ID) {
|
||||||
if (AD_InfoWindow_ID > 0) {
|
if (AD_InfoWindow_ID > 0) {
|
||||||
Integer key = Integer.valueOf(AD_InfoWindow_ID);
|
String key = String.valueOf(AD_InfoWindow_ID) + "|" + Env.getAD_Role_ID(Env.getCtx());
|
||||||
MInfoWindow infoWin = s_cache.get(key);
|
MInfoWindow infoWin = s_cache.get(key);
|
||||||
if (infoWin != null)
|
if (infoWin != null)
|
||||||
return infoWin;
|
return infoWin;
|
||||||
|
|
Loading…
Reference in New Issue