root/trunk/grails-app/domain/dbnp/studycapturing/ProtocolParameterType.groovy @ 247

Revision 247, 0.7 KB (checked in by duh, 4 years ago)

- set keyword expansion

  • Property svn:keywords set to Author Rev Date
Line 
1package dbnp.studycapturing
2
3/**
4 * Enum describing the type of a protocol parameter.
5 */
6public enum ProtocolParameterType {
7    STRING('String'),
8    INTEGER('Integer number'),
9    FLOAT('Decimal number'),
10    STRINGLIST('List')
11
12    String name
13    ProtocolParameterType(String name) { this.name = name }
14
15
16    static list() {
17     [STRING, INTEGER, FLOAT, STRINGLIST]
18    }
19
20
21    // It would be nice to see the description string in the scaffolding,
22    // and the following works, but then the item cannot be saved properly.
23    // TODO: find a way to display the enum description but save the enum value in the scaffolding
24    /*def String toString() {
25        return this.name
26    }*/
27
28}
Note: See TracBrowser for help on using the browser.