use of org.obiba.mica.dataset.event.DatasetUpdatedEvent in project mica2 by obiba.
the class CollectedDatasetService method saveInternal.
private void saveInternal(StudyDataset dataset, String comment) {
StudyDataset saved = prepareSave(dataset);
StudyDatasetState studyDatasetState = findEntityState(dataset, StudyDatasetState::new);
if (!dataset.isNew())
ensureGitRepository(studyDatasetState);
studyDatasetState.incrementRevisionsAhead();
studyDatasetStateRepository.save(studyDatasetState);
saved.setLastModifiedDate(DateTime.now());
studyDatasetRepository.save(saved);
gitService.save(saved, comment);
eventBus.post(new DatasetUpdatedEvent(saved));
}
Aggregations