root/trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy @ 224

Revision 224, 0.6 KB (checked in by keesvb, 4 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
Line 
1package dbnp.studycapturing
2
3/**
4 * This is the superclass for template fields. Normally, this class will not be instantiated.
5 *
6 * Revision information:
7 * $Rev$
8 * $Author$
9 * $Date$
10 */
11class TemplateField implements Serializable {
12        String name
13        TemplateFieldType type
14        String unit
15
16    static hasMany = [listEntries : String] // to store the entries to choose from when the type is 'item from predefined list'
17        //TODO: make TemplateFieldListItem and make a convenience setter for a string array
18
19        static constraints = {
20                name(unique: true)
21                unit(nullable: true, blank: true)
22        }
23
24        String toString() {
25                return name
26        }
27}
Note: See TracBrowser for help on using the browser.