* @throws ApsSystemException In caso di errore.
*/
protected void addNewsletterReport(NewsletterReport newsletterReport) throws ApsSystemException {
if (null == newsletterReport) return;
try {
IKeyGeneratorManager keyGeneratorManager = this.getKeyGeneratorManager();
newsletterReport.setId(keyGeneratorManager.getUniqueKeyCurrentValue());
for (ContentReport contentReport : newsletterReport.getContentReports().values()) {
contentReport.setId(keyGeneratorManager.getUniqueKeyCurrentValue());
}
this.getNewsletterDAO().addNewsletterReport(newsletterReport);
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "buildMailBody", "Error adding newsletter report : id " + newsletterReport.getId());
}