source: trunk/grails-app/domain/dbnp/studycapturing/Study.groovy @ 224

Last change on this file since 224 was 224, checked in by keesvb, 7 years ago

revised templating system: templates are now per entity rather than per study, moved samples to Study

  • Property svn:keywords set to Rev Date Author
File size: 980 bytes
Line 
1package dbnp.studycapturing
2
3/**
4 * Domain class describing the basic entity in the study capture part: the Study class.
5 *
6 * Revision information:
7 * $Rev: 224 $
8 * $Author: keesvb $
9 * $Date: 2010-03-02 17:10:52 +0000 (di, 02 mrt 2010) $
10 */
11class Study extends TemplateEntity implements Serializable {
12        static searchable = true
13        nimble.User owner
14        String title
15        String code
16        String researchQuestion
17        String description
18        String ecCode
19        Date dateCreated
20        Date lastUpdated
21        Date startDate
22
23        static hasMany = [
24                editors: nimble.User,
25                readers: nimble.User,
26                subjects: Subject,
27                groups: SubjectGroup,
28                events: Event,
29                samplingEvents: SamplingEvent,
30                samples: Sample,
31                assays: Assay,
32                persons: StudyPerson,
33                publications: Publication
34        ]
35
36        static constraints = {
37                owner(nullable: true, blank: true)
38                title(nullable: false, blank: false)
39                template(nullable: true, blank: true)
40        }
41
42        static mapping = {
43                researchQuestion type: 'text'
44                description type: 'text'
45                autoTimestamp true
46        }
47
48        def String toString() {
49                return title;
50        }
51
52}
Note: See TracBrowser for help on using the repository browser.