|
Last change
on this file since 242 was
234,
checked in by gav, 16 years ago
|
|
New AppConfig class for storing application configuration settings in the database.
Service class, unit tests, views and controller to suite.
|
|
File size:
459 bytes
|
| Line | |
|---|
| 1 | /** |
|---|
| 2 | * Domain class that stores various application configuration (settings) in the database. |
|---|
| 3 | * Use AppConfigService to interact with the instances. |
|---|
| 4 | */ |
|---|
| 5 | class AppConfig { |
|---|
| 6 | String name |
|---|
| 7 | String value |
|---|
| 8 | String description = '' |
|---|
| 9 | |
|---|
| 10 | static constraints = { |
|---|
| 11 | name(maxSize:50,unique:true,blank:false) |
|---|
| 12 | description(maxSize:100) |
|---|
| 13 | value(maxSize:50,blank:false) |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | String toString() { |
|---|
| 17 | "${this.name} = ${this.value}" |
|---|
| 18 | } |
|---|
| 19 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.