source: trunk/grails-app/domain/dbnp/studycapturing/Subject.groovy @ 458

Last change on this file since 458 was 458, checked in by roberth, 9 years ago

Subject class changed again to improve performance. Also updated bootstrap in order to keep the study capture wizard running

  • Property svn:keywords set to Date Author Rev
File size: 927 bytes
Line 
1package dbnp.studycapturing
2
3import dbnp.data.Term
4import dbnp.data.Ontology
5
6/**
7 * This domain class describes the subjects in a study.
8 *
9 * Revision information:
10 * $Rev: 458 $
11 * $Author: roberth $
12 * $Date: 2010-05-25 09:18:21 +0000 (di, 25 mei 2010) $
13 */
14class Subject extends TemplateEntity implements Serializable {
15        static searchable = true
16        String name
17        Term species
18       
19        /**
20         * return the domain fields for this domain class
21         * @return List
22         */
23        List<TemplateField> giveDomainFields() { return Subject.domainFields; }
24
25        static List<TemplateField> domainFields =
26                [
27                        new TemplateField(
28                                name: 'name',
29                                type: TemplateFieldType.STRING,
30                                preferredIdentifier: true,
31                                comment: 'Use the local subject name or the pre-defined name'),
32                        new TemplateField(
33                                name: 'species',
34                                type: TemplateFieldType.ONTOLOGYTERM,
35                                comment: "The species name is based on the NEWT ontology; if a species is missing, please add it to the ontology using 'add more'")
36                ]
37}
Note: See TracBrowser for help on using the repository browser.