@Transactional(propagation = Propagation.REQUIRES_NEW) public PersisterStatistics saveOrUpdateInNewTransaction(AnnotatedObject... annotatedObjects ) throws PersisterException { return saveOrUpdate(annotatedObjects); }
@Transactional(propagation = Propagation.REQUIRES_NEW) public PersisterStatistics saveOrUpdateInNewTransaction(AnnotatedObject... annotatedObjects ) throws PersisterException { return saveOrUpdate(annotatedObjects); }
public PersisterStatistics saveOrUpdate( IntactEntry... intactEntries ) throws PersisterException { for ( IntactEntry intactEntry : intactEntries ) { // Very important to not rely on the collection of interaction of the intactEntry. The core persister is updating the list of interactions // of an experiment so if the collection of interactions of this intactEntry is the collection of interactions of the experiment, we can have // concurrent modification. Indeed, this problem didn't exist when setting the list of experiments in the core persister instead of clear and addAll. Collection<Interaction> interactionsToSave = new ArrayList<Interaction>(intactEntry.getInteractions()); for ( Interaction interaction : interactionsToSave ) { saveOrUpdate( interaction ); } } return statistics; }
public PersisterStatistics saveOrUpdate( IntactEntry... intactEntries ) throws PersisterException { for ( IntactEntry intactEntry : intactEntries ) { // Very important to not rely on the collection of interaction of the intactEntry. The core persister is updating the list of interactions // of an experiment so if the collection of interactions of this intactEntry is the collection of interactions of the experiment, we can have // concurrent modification. Indeed, this problem didn't exist when setting the list of experiments in the core persister instead of clear and addAll. Collection<Interaction> interactionsToSave = new ArrayList<Interaction>(intactEntry.getInteractions()); for ( Interaction interaction : interactionsToSave ) { saveOrUpdate( interaction ); } } return statistics; }