source: trunk/grails-app/domain/dbnp/studycapturing/ProtocolParameter.groovy @ 235

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

The options that protocol parameters can take on are no longer represented by Strings. Instead we created a wrapper Object (ParameterStringListItem?). In this way we avoid problems with multi-user operations. Such problems can arrive as follows: if options are Strings, there is no difference beteween them and their identifier. When instead lists are wrapped, changing the strings does not affect their identifier, and thus simultanious read/write operations become less error prone.

  • Property svn:keywords set to Rev Date Author
File size: 667 bytes
Line 
1package dbnp.studycapturing
2
3import dbnp.data.Term
4
5/**
6 * The ProtocolParameter class describes a protocol parameter, and belongs to the Protocol class.
7 * Actual values of this parameter are stored in the corresponding field of the ProtocolInstance class.
8 */
9class ProtocolParameter {
10
11    String name
12    ProtocolParameterType type
13    String unit
14    String description
15    Term reference
16
17    static hasMany = [listEntries : ParameterStringListItem ] // to store the entries to choose from when the type is 'item from predefined list'
18
19    static constraints = {
20            unit(nullable: true)
21            reference(nullable: true)
22            description(nullable: true)
23    }
24}
Note: See TracBrowser for help on using the repository browser.