if(log){
if (dolog){
    private boolean updateAdminPreference(Admin admin, BigInteger serialnumber, AdminPreference adminpreference, boolean log){       debug(">updateAdminPreference(serial : " + serialnumber + ")");       boolean ret = false;        try {            AdminPreferencesDataLocal apdata = adminpreferenceshome.findByPrimaryKey(serialnumber.toString());            adminpreferenceshome.remove(serialnumber.toString());            try{                AdminPreferencesDataLocal apdata2 = adminpreferenceshome.findByPrimaryKey(serialnumber.toString());            }  catch (javax.ejb.FinderException fe) {            }            apdata= adminpreferenceshome.create(serialnumber.toString(),adminpreference);            try{                AdminPreferencesDataLocal apdata3 = adminpreferenceshome.findByPrimaryKey(serialnumber.toString());            }  catch (javax.ejb.FinderException fe) {            }            if(log)              logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_INFO_ADMINISTRATORPREFERENCECHANGED,"Administrator preference changed.");            ret = true;        } catch (javax.ejb.FinderException fe) {             ret=false;             if(log){               try{                 logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ADMINISTRATORPREFERENCECHANGED,"Administrator cannot be found i database.");               }catch (RemoteException re) {}             }        } catch(Exception e){          throw new EJBException(e);        }        debug("<updateAdminPreference()");        return ret;    } // changeAdminPreference