Changeset 9 for trunk/grails-app/domain/nl/tno/metagenomics/Sample.groovy
- Timestamp:
- Jan 28, 2011, 12:30:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/nl/tno/metagenomics/Sample.groovy
r7 r9 8 8 class Sample { 9 9 String sampleToken // Unique within a study 10 String name 10 String name 11 String subject 12 String event 11 13 12 14 static belongsTo = [ study: Study ] … … 18 20 assaySamples cascade: "all-delete-orphan" 19 21 } 22 static constraints = { 23 subject(nullable: true) 24 event(nullable: true) 25 } 26 27 public static cloneSample( Sample otherSample, String newSampleToken, Study otherStudy ) { 28 return new Sample( 29 sampleToken: newSampleToken, 30 name: otherSample.name, 31 subject: otherSample.subject, 32 event: otherSample.event, 33 study: otherStudy 34 ); 35 } 20 36 }
Note: See TracChangeset
for help on using the changeset viewer.