Last change
on this file since 18 was
18,
checked in by tuxta, 16 years ago
|
Align domain classes to ERD.
|
File size:
574 bytes
|
Rev | Line | |
---|
[16] | 1 | class Person { |
---|
[18] | 2 | PersonGroup personGroup |
---|
[16] | 3 | String firstName |
---|
| 4 | String lastName |
---|
| 5 | Integer employeeID |
---|
| 6 | boolean isActive = true |
---|
| 7 | |
---|
| 8 | static hasMany = [modifications : Modification, |
---|
[18] | 9 | entries : Entry, tasks : Task, |
---|
| 10 | personGroups : PersonGroup] |
---|
[16] | 11 | |
---|
[18] | 12 | static belongsTo = [PersonGroup] |
---|
[16] | 13 | |
---|
| 14 | static optionals = ["employeeID"] |
---|
| 15 | |
---|
| 16 | static constraints = { |
---|
| 17 | firstName() |
---|
| 18 | lastName() |
---|
| 19 | employeeID() |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | //Overriding the default toString method |
---|
| 23 | String toString() {"${this.firstName}:"{this.lastName}} |
---|
| 24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.