IDEMPIERE-5996 - Added the functionality of resetting cache after cre… (#2186)
* IDEMPIERE-5996 - Added the functionality of resetting cache after creating a record access restriction * Update MRecordAccess.java --------- Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
parent
63823f3a40
commit
735a735fbb
|
@ -21,6 +21,8 @@ import java.sql.ResultSet;
|
|||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.util.CacheMgt;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
|
@ -33,9 +35,9 @@ import org.compiere.util.Msg;
|
|||
public class MRecordAccess extends X_AD_Record_Access
|
||||
{
|
||||
/**
|
||||
* generated serial id
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5115765616266528435L;
|
||||
private static final long serialVersionUID = -3608241027957009608L;
|
||||
|
||||
/**
|
||||
* UUID based Constructor
|
||||
|
@ -288,4 +290,20 @@ public class MRecordAccess extends X_AD_Record_Access
|
|||
return m_tableName;
|
||||
} // getTableName
|
||||
|
||||
/**
|
||||
* After Save
|
||||
* @param newRecord new
|
||||
* @param success success
|
||||
* @return success
|
||||
*/
|
||||
@Override
|
||||
protected boolean afterSave(boolean newRecord, boolean success) {
|
||||
if (!success)
|
||||
return success;
|
||||
|
||||
Adempiere.getThreadPoolExecutor().submit(() -> CacheMgt.get().reset(MRole.Table_Name, getAD_Role_ID()));
|
||||
|
||||
return success;
|
||||
} // afterSave
|
||||
|
||||
} // MRecordAccess
|
||||
|
|
Loading…
Reference in New Issue