root/trunk/grails-app/domain/dbnp/studycapturing/Study.groovy @ 188

Revision 188, 1.1 KB (checked in by keesvb, 4 years ago)

clarified clean data feature example in sandbox

  • Property svn:keywords set to
    Date
    Author
    Rev
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$
8 * $Author$
9 * $Date$
10 */
11class Study 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        Template template
23
24        static hasMany = [      editors: nimble.User,
25                        readers: nimble.User,
26                        subjects: Subject,
27                        groups: SubjectGroup,
28                        events: Event,
29                        samplingEvents: SamplingEvent,
30                        assays: Assay,
31                        persons: StudyPerson,
32                        publications: Publication
33        ]
34
35        static constraints = {
36                owner(nullable: true, blank: true)
37                title(nullable: false, blank: false)
38                template(nullable: true, blank: true)
39        }
40
41        static mapping = {
42                researchQuestion type: 'text'
43                description type: 'text'
44                autoTimestamp true
45        }
46
47        def String toString() {
48                return title;
49        }
50
51        def giveAllFields() {
52                return template.studyFields;
53        }
54
55        def giveSamples() {
56                return samplingEvents*.samples;
57        }
58}
Note: See TracBrowser for help on using the browser.