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

Last change on this file since 643 was 643, checked in by jahn, 11 years ago

This setting of searchable features seems not to provoke searchable errors for the time being.

  • Property svn:keywords set to Date Rev Author
File size: 934 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: 643 $
11 * $Author: jahn $
12 * $Date: 2010-07-02 10:45:21 +0000 (vr, 02 jul 2010) $
13 */
14class Subject extends TemplateEntity implements Serializable {
15
16    static searchable = { [only: ['name']] }
17        String name
18        Term species
19
20        /**
21         * return the domain fields for this domain class
22         * @return List
23         */
24        static List<TemplateField> giveDomainFields() { return Subject.domainFields; }
25
26        static List<TemplateField> domainFields = [
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.