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

Last change on this file since 667 was 667, checked in by duh, 11 years ago
  • Property svn:keywords set to Date Rev Author
File size: 1.0 KB
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: 667 $
11 * $Author: duh $
12 * $Date: 2010-07-20 08:41:08 +0000 (di, 20 jul 2010) $
13 */
14class Subject extends TemplateEntity implements Serializable {
15        // uncommented due to searchable issue
16        // @see http://jira.codehaus.org/browse/GRAILSPLUGINS-1577
17        //static searchable = { [only: ['name']] }
18
19        String name
20        Term species
21
22        /**
23         * return the domain fields for this domain class
24         * @return List
25         */
26        static List<TemplateField> giveDomainFields() { return Subject.domainFields; }
27
28        static List<TemplateField> domainFields = [
29                new TemplateField(
30                        name: 'name',
31                        type: TemplateFieldType.STRING,
32                        preferredIdentifier: true,
33                        comment: 'Use the local subject name or the pre-defined name'),
34                new TemplateField(
35                        name: 'species',
36                        type: TemplateFieldType.ONTOLOGYTERM,
37                        comment: "The species name is based on the NEWT ontology; if a species is missing, please add it to the ontology using 'add more'")
38        ]
39}
Note: See TracBrowser for help on using the repository browser.