source: trunk/grails-app/domain/dbnp/studycapturing/Person.groovy

Last change on this file was 1736, checked in by work@…, 13 years ago
  • resolves issue #384, studyPerson, publications and users are not deleted properly
  • Property svn:keywords set to Rev Author Date
File size: 1.2 KB
Line 
1package dbnp.studycapturing
2import org.dbnp.gdt.*
3
4/**
5 * The Person class represents a person who is related to one ore more studies, such as a PI, a lab analyst etc.
6 * Those people do not neccessarily have an account in GSCF, the Study/Persons/Affiliations administration
7 * is independent of GSCF usernames and accounts.
8 *
9 * Revision information:
10 * $Rev: 1736 $
11 * $Author: work@osx.eu $
12 * $Date: 2011-04-08 14:03:23 +0000 (vr, 08 apr 2011) $
13 */
14class Person extends Identity {
15        String title
16        String gender
17        String lastName
18        String prefix
19        String firstName
20        String initials
21        String email
22        String fax
23        String phone
24        String mobile
25        String address
26
27        static hasMany = [affiliations: PersonAffiliation]
28
29        static constraints = {
30                title(nullable: true, blank: true)
31                gender(nullable: true, blank: true)
32                firstName(nullable: true, blank: true)
33                initials(nullable: true, blank: true)
34                prefix(nullable: true, blank: true)
35                lastName(nullable: true, blank: true)
36                email(nullable: true, blank: true)
37                fax(nullable: true, blank: true)
38                phone(nullable: true, blank: true)
39                address(nullable: true, blank: true)
40                mobile(nullable: true, blank: true)
41        }
42
43    static mapping = {
44        sort 'lastName': 'asc'
45                sort 'firstName': 'asc'
46    }
47
48        def String toString() {
49                return "${lastName}, ${firstName}"
50        }
51}
Note: See TracBrowser for help on using the repository browser.