Changeset 232 for trunk/grails-app/domain
- Timestamp:
- Mar 3, 2010, 5:18:22 PM (13 years ago)
- Location:
- trunk/grails-app/domain/dbnp/studycapturing
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/studycapturing/Event.groovy
r209 r232 14 14 */ 15 15 class Event implements Serializable { 16 Subject subject17 16 EventDescription eventDescription 18 17 Date startTime … … 29 28 30 29 static constraints = { 31 subject(nullable: true, blank: true) // TODO: subject is to be removed from Event, and into EventGroup32 30 startTime(nullable:false) 33 31 endTime(validator: {val, obj -> -
trunk/grails-app/domain/dbnp/studycapturing/Sample.groovy
r224 r232 6 6 * The Sample class describes an actual sample which results from a SamplingEvent. 7 7 */ 8 class Sample {8 class Sample extends TemplateEntity { 9 9 static searchable = true 10 10 11 Subject parentSubject 12 SamplingEvent parentEvent 11 13 14 String name // should be unique with respect to the parent study (which can be inferred) 15 Term material 16 // a member that describes the quantity of the sample? --> should be in the templates 12 17 13 String name // should be unique with respect to the parent study (which can be inferred) 14 Term material 15 // don't we need a member that describes the quantity of the sample? --> should be in the templates 16 17 static constraints = { 18 } 18 static constraints = { 19 } 19 20 20 21 } -
trunk/grails-app/domain/dbnp/studycapturing/SamplingEvent.groovy
r190 r232 5 5 * 6 6 * NOTE: according to documentation, super classes and subclasses share the same table. 7 * thus, there is actually no reason not to merge the sampling with the Event super class.8 * this is especially true, since the subclass adds only one has-many relation ship.7 * thus, we could merge the sampling with the Event super class and include a boolean 8 * However, using a separate class makes it more clear in the code that Event and SamplingEvent are treated differently 9 9 */ 10 10 11 11 class SamplingEvent extends Event { 12 12 13 static hasMany = [samples : Sample]14 15 13 static constraints = { 16 14 } -
trunk/grails-app/domain/dbnp/studycapturing/Study.groovy
r229 r232 28 28 events: Event, 29 29 samplingEvents: SamplingEvent, 30 eventGroups: EventGroup, 30 31 samples: Sample, 31 32 assays: Assay, -
trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy
r224 r232 14 14 String unit 15 15 16 static hasMany = [listEntries : String] // to store the entries to choose from when the type is 'item from predefined list' 17 //TODO: make TemplateFieldListItem and make a convenience setter for a string array 16 static hasMany = [listEntries : TemplateFieldListItem] // to store the entries to choose from when the type is 'item from predefined list' 18 17 19 18 static constraints = { … … 25 24 return name 26 25 } 26 27 //TODO: make a convenience setter for a string array 28 /*def setListEntries(ArrayList entries) { 29 list=[] 30 entries.each { 31 list.add(new TemplateFieldListItem(name: it)) 32 } 33 this 34 }*/ 35 27 36 }
Note: See TracChangeset
for help on using the changeset viewer.