Last change
on this file since 902 was
722,
checked in by gav, 14 years ago
|
Domain change: as per ticket #97 - Drop the entire Manufacturer domain concept.
|
File size:
753 bytes
|
Rev | Line | |
---|
[397] | 1 | class Address { |
---|
| 2 | |
---|
| 3 | AddressType addressType |
---|
| 4 | |
---|
| 5 | Supplier supplier |
---|
| 6 | Person person |
---|
| 7 | Site site |
---|
| 8 | |
---|
| 9 | String street1 = '' |
---|
| 10 | String street2 = '' |
---|
| 11 | String city = '' |
---|
| 12 | String state = '' |
---|
| 13 | String postCode = '' |
---|
| 14 | String country = '' |
---|
| 15 | |
---|
| 16 | // hasMany = [] |
---|
| 17 | |
---|
[722] | 18 | static belongsTo = [Supplier, Person, Site] |
---|
[397] | 19 | |
---|
| 20 | static constraints = { |
---|
| 21 | street1(blank:false,maxSize:50) |
---|
| 22 | street2(maxSize:50) |
---|
| 23 | city(blank:false,maxSize:50) |
---|
| 24 | state(blank:false,maxSize:50) |
---|
| 25 | postCode(blank:false,maxSize:50) |
---|
| 26 | country(blank:false,maxSize:50) |
---|
| 27 | supplier(nullable:true) |
---|
| 28 | person(nullable:true) |
---|
| 29 | site(nullable:true) |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | String toString() { |
---|
| 33 | "${this.addressType}: ${this.street1}, ${this.city}" |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.