|
Last change
on this file since 818 was
210,
checked in by gav, 16 years ago
|
|
Make date calculations and formatting more groovy.
|
|
File size:
464 bytes
|
| Line | |
|---|
| 1 | class TaskModification { |
|---|
| 2 | Person person |
|---|
| 3 | TaskModificationType taskModificationType |
|---|
| 4 | Task task |
|---|
| 5 | Date date = new Date() |
|---|
| 6 | String comment = "" |
|---|
| 7 | |
|---|
| 8 | static belongsTo = [Person, TaskModificationType, Task] |
|---|
| 9 | |
|---|
| 10 | static constraints = { |
|---|
| 11 | person() |
|---|
| 12 | taskModificationType() |
|---|
| 13 | task() |
|---|
| 14 | date() |
|---|
| 15 | comment() |
|---|
| 16 | } |
|---|
| 17 | |
|---|
| 18 | String toString() { |
|---|
| 19 | "${taskModificationType} on ${date.format('EEE, dd-MMM-yyyy')} by ${person}." |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.