blogEntry.setDate(new Date(blogEntry.getDate().getTime() + 1));
putBlogEntry(blogEntry);
} else {
if (!blogEntry.isPersistent()) {
dao.storeBlogEntry(blogEntry);
blogEntry.insertEvent(new BlogEntryEvent(blogEntry, BlogEntryEvent.BLOG_ENTRY_ADDED));
for (Comment comment : blogEntry.getComments()) {
blogEntry.addEvent(new CommentEvent(comment, CommentEvent.COMMENT_ADDED));
}
for (TrackBack trackBack : blogEntry.getTrackBacks()) {
blogEntry.addEvent(new TrackBackEvent(trackBack, TrackBackEvent.TRACKBACK_ADDED));
}
} else {
dao.storeBlogEntry(blogEntry);
if (blogEntry.isDirty()) {
blogEntry.insertEvent(new BlogEntryEvent(blogEntry, blogEntry.getPropertyChangeEvents()));
}
}
blogEntry.getBlog().getEventDispatcher().fireEvents(blogEntry);