if (dolog){ getLogSession().log(admin,admin.getCAId(), LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ADMINISTRATORPREFERENCECHANGED,"Administrator cannot be found i database.");
if (dolog) { getLogSession().log(admin,admin.getCAId(), LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ADMINISTRATORPREFERENCECHANGED,"Administrator preference cannot be found i database.");
    private boolean updateAdminPreference(Admin admin, String certificatefingerprint, AdminPreference adminpreference, boolean dolog){       debug(">updateAdminPreference(fingerprint : " + certificatefingerprint + ")");       boolean ret = false;        try {            AdminPreferencesDataLocal apdata = adminpreferenceshome.findByPrimaryKey(certificatefingerprint);            adminpreferenceshome.remove(certificatefingerprint);            try{                AdminPreferencesDataLocal apdata2 = adminpreferenceshome.findByPrimaryKey(certificatefingerprint);            }  catch (javax.ejb.FinderException fe) {            }            apdata= adminpreferenceshome.create(certificatefingerprint,adminpreference);            try{                AdminPreferencesDataLocal apdata3 = adminpreferenceshome.findByPrimaryKey(certificatefingerprint);            }  catch (javax.ejb.FinderException fe) {            }            if (dolog)              getLogSession().log(admin, admin.getCAId(), 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 (dolog){               getLogSession().log(admin,admin.getCAId(), LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ADMINISTRATORPREFERENCECHANGED,"Administrator cannot be found i database.");             }        } catch(Exception e){          throw new EJBException(e);        }        debug("<updateAdminPreference()");        return ret;    } // changeAdminPreference