@RequiredPermission(Permission.MANAGE_INVENTORY) public AdvisoryCVE createAdvisoryCVE(Subject user, Advisory advisory, CVE cve) throws AdvisoryException { log.debug("User [" + user + "] is creating AdvisoryCVE [" + advisory + "]"); AdvisoryCVE advcve = new AdvisoryCVE(advisory, cve); entityManager.persist(advcve); return advcve; }
@PrePersist void onPersist() { this.setLastModifiedDate(System.currentTimeMillis()); }
AdvisoryCVEDetails acve = new AdvisoryCVEDetails(cve.getCVE().getName()); detail.addCVE(acve);
if (cves != null && cves.size() > 0) { for (AdvisoryCVEDetails cve : cves) { AdvisoryCVE acve = new AdvisoryCVE(newAdv, advManager.createCVE(overlord, cve.getName())); entityManager.persist(acve); entityManager.flush();