source: trunk/grails-app/domain/AssetSubItem.groovy @ 902

Last change on this file since 902 was 456, checked in by gav, 15 years ago

Set batchSize:1000 on asset tree domain classes.

File size: 772 bytes
Line 
1class AssetSubItem {
2
3    AssetSubItem parentItem
4
5    String name
6    String description = ""
7    String comment = ""
8    boolean isActive = true
9
10    static hasMany = [assets: Asset,
11                                subItems: AssetSubItem,
12                                maintenanceActions: MaintenanceAction,
13                                assetSubItemExtendedAttributes: AssetSubItemExtendedAttribute]
14
15    static belongsTo = [Asset, AssetSubItem]
16
17    static constraints = {
18        name(maxSize:50, unique:true, blank:false)
19        description(maxSize:75)
20        comment(maxSize:500)
21        isActive()
22        parentItem(nullable:true)
23    }
24
25    static mapping = {
26        subItems(batchSize:1000)
27    }
28
29    String toString() {
30        "${this.name}"
31    }
32}
33
Note: See TracBrowser for help on using the repository browser.