source: trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy @ 247

Last change on this file since 247 was 247, checked in by duh, 8 years ago
  • set keyword expansion
  • Property svn:keywords set to Author Rev Date
File size: 747 bytes
RevLine 
[84]1package dbnp.studycapturing
2
3/**
4 * This is the superclass for template fields. Normally, this class will not be instantiated.
[145]5 *
6 * Revision information:
7 * $Rev: 247 $
8 * $Author: duh $
9 * $Date: 2010-03-08 17:29:14 +0000 (ma, 08 mrt 2010) $
[84]10 */
[224]11class TemplateField implements Serializable {
[145]12        String name
13        TemplateFieldType type
14        String unit
[84]15
[232]16    static hasMany = [listEntries : TemplateFieldListItem] // to store the entries to choose from when the type is 'item from predefined list'
[158]17
[145]18        static constraints = {
19                name(unique: true)
20                unit(nullable: true, blank: true)
21        }
[92]22
[176]23        String toString() {
[92]24                return name
25        }
[232]26
27        //TODO: make a convenience setter for a string array
28        /*def setListEntries(ArrayList entries) {
29                list=[]
30                entries.each {
31                        list.add(new TemplateFieldListItem(name: it))
32                }
33                this
34        }*/
35
[84]36}
Note: See TracBrowser for help on using the repository browser.