public MChangeLog changeLog(String TrxName,int AD_ChangeLog_ID,int AD_Table_ID,int AD_Column_ID,int Record_ID,int AD_Client_ID,int AD_Org_ID,Object OldValue,Object NewValue,String event){
  if (OldValue == null && NewValue == null)   return null;
  if (OldValue != null && NewValue != null && OldValue.equals(NewValue))   return null;
  MRole role=MRole.getDefault(getCtx(),false);
  if (m_webStoreSession || MChangeLog.isLogged(AD_Table_ID) || (role != null && role.isChangeLog()))   ;
 else   return null;
  log.finest("AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID="+ getAD_Session_ID()+ ", AD_Table_ID="+ AD_Table_ID+ ", AD_Column_ID="+ AD_Column_ID+ ": "+ OldValue+ " -> "+ NewValue);
  try {
    MChangeLog cl=new MChangeLog(getCtx(),AD_ChangeLog_ID,TrxName,getAD_Session_ID(),AD_Table_ID,AD_Column_ID,Record_ID,AD_Client_ID,AD_Org_ID,OldValue,NewValue,event);
    if (cl.save())     return cl;
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID="+ getAD_Session_ID()+ ", AD_Table_ID="+ AD_Table_ID+ ", AD_Column_ID="+ AD_Column_ID,e);
    return null;
  }
  log.log(Level.SEVERE,"AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID="+ getAD_Session_ID()+ ", AD_Table_ID="+ AD_Table_ID+ ", AD_Column_ID="+ AD_Column_ID);
  return null;
}

public MChangeLog changeLog ( String TrxName , int AD_ChangeLog_ID , int AD_Table_ID , int AD_Column_ID , int Record_ID , int AD_Client_ID , int AD_Org_ID , Object OldValue , Object NewValue , String event ) { if ( OldValue == null && NewValue == null ) return null ; if ( OldValue != null && NewValue != null && OldValue . equals ( NewValue ) ) return null ; MRole role = MRole . getDefault ( getCtx ( ) , false ) ; if ( m_webStoreSession || MChangeLog . isLogged ( AD_Table_ID ) || ( role != null && role . isChangeLog ( ) ) ) ; else return null ; log . finest ( "AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID=" + getAD_Session_ID ( ) + ", AD_Table_ID=" + AD_Table_ID + ", AD_Column_ID=" + AD_Column_ID + ": " + OldValue + " -> " + NewValue ) ; try { MChangeLog cl = new MChangeLog ( getCtx ( ) , AD_ChangeLog_ID , TrxName , getAD_Session_ID ( ) , AD_Table_ID , AD_Column_ID , Record_ID , AD_Client_ID , AD_Org_ID , OldValue , NewValue , event ) ; if ( cl . save ( ) ) return cl ; } catch ( Exception e ) { log . log ( Level . SEVERE , "AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID=" + getAD_Session_ID ( ) + ", AD_Table_ID=" + AD_Table_ID + ", AD_Column_ID=" + AD_Column_ID , e ) ; return null ; } log . log ( Level . SEVERE , "AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID=" + getAD_Session_ID ( ) + ", AD_Table_ID=" + AD_Table_ID + ", AD_Column_ID=" + AD_Column_ID ) ; return null ; }
create change log only if table is logged
