setReqadmincertissuerdn(CertTools.getIssuerDN(approvalRequest.getRequestAdminCert())); setReqadmincertsn(approvalRequest.getRequestAdminCert().getSerialNumber().toString(16));
if(approvalRequest.getRequestAdminCert() != null){ setReqadmincertissuerdn(CertTools.getIssuerDN(approvalRequest.getRequestAdminCert())); setReqadmincertsn(approvalRequest.getRequestAdminCert().getSerialNumber().toString(16)); }
    public Integer ejbCreate(Integer id, ApprovalRequest approvalRequest) throws CreateException {        setId(id);        setApprovalid(approvalRequest.generateApprovalId());        setApprovaltype(approvalRequest.getApprovalType());        setEndentityprofileid(approvalRequest.getEndEntityProfileId());                setCaid(approvalRequest.getCAId());                setReqadmincertissuerdn(CertTools.getIssuerDN(approvalRequest.getRequestAdminCert()));        setReqadmincertsn(approvalRequest.getRequestAdminCert().getSerialNumber().toString(16));        setStatus(ApprovalDataVO.STATUS_WAITINGFORAPPROVAL);                setApprovals(new ArrayList());        setApprovalRequest(approvalRequest);                        setRequestDate(new Date());        setExpiredate((new Date()).getTime() + approvalRequest.getRequestValidity());        setRemainingapprovals(approvalRequest.getNumOfRequiredApprovals());        log.debug("Created approval with id " + id);        return id;    }