Changeset 9 for trunk/grails-app/services/nl/tno/metagenomics/integration/SynchronizationService.groovy
- Timestamp:
- Jan 28, 2011, 12:30:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/nl/tno/metagenomics/integration/SynchronizationService.groovy
r7 r9 79 79 */ 80 80 public void fullSynchronization() { 81 if( !timeForFullSynchronization() )82 return83 84 81 def previousEager = this.eager 85 82 this.eager = true … … 630 627 631 628 // Update the sample object if necessary 632 if( sampleFound.name != gscfSample.name ) {633 sampleFound.name = gscfSample.name634 sampleFound.save();635 }629 sampleFound.name = gscfSample.name 630 sampleFound.subject = gscfSample.subject 631 sampleFound.event = gscfSample.event + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" ) 632 sampleFound.save(); 636 633 } else { 637 634 log.trace( "AssaySample not found in assay" ) … … 644 641 645 642 // Update the sample object if necessary 646 if( sampleFound.name != gscfSample.name ) {647 sampleFound.name = gscfSample.name648 sampleFound.save();649 }643 sampleFound.name = gscfSample.name 644 sampleFound.subject = gscfSample.subject 645 sampleFound.event = gscfSample.event + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" ) 646 sampleFound.save(); 650 647 } else { 651 648 log.trace( "Sample " + gscfSample.sampleToken + " not found in database. Creating a new object." ) … … 653 650 // If it doesn't exist, create a new object 654 651 sampleFound = new Sample( sampleToken: gscfSample.sampleToken, name: gscfSample.name, study: assay.study ); 652 sampleFound.subject = gscfSample.subject 653 sampleFound.event = gscfSample.event + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" ) 655 654 assay.study.addToSamples( sampleFound ); 656 655 sampleFound.save();
Note: See TracChangeset
for help on using the changeset viewer.