- Timestamp:
- Jan 28, 2011, 10:04:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/taskProcedureRework/grails-app/domain/TaskProcedure.groovy
r760 r762 1 import org.apache.commons.collections.list.LazyList ;2 import org.apache.commons.collections.FactoryUtils ;1 import org.apache.commons.collections.list.LazyList 2 import org.apache.commons.collections.FactoryUtils 3 3 4 4 class TaskProcedure { 5 5 6 Task parentTask 6 Task linkedTask 7 8 def getDescription() { linkedTask.description } 9 def getAsset() { linkedTask.primaryAsset } 10 7 11 List maintenanceActions = new ArrayList() 12 8 13 static hasMany = [tasks: Task, maintenanceActions: MaintenanceAction] 14 15 def getMaintenanceActionLazyList() { 16 return LazyList.decorate(maintenanceActions, FactoryUtils.instantiateFactory(MaintenanceAction.class)) 17 } 9 18 10 19 static mappedBy = [tasks:"taskProcedure"] 11 20 12 21 static mapping = { 13 maintenanceActions cascade:"all ,delete-orphan"22 maintenanceActions cascade:"all-delete-orphan" 14 23 } 15 24 … … 22 31 "${this.id}" 23 32 } 24 25 def getExpandableMaintenanceActionList() {26 return LazyList.decorate(maintenanceActions, FactoryUtils.instantiateFactory(MaintenanceAction.class))27 }28 33 }
Note: See TracChangeset
for help on using the changeset viewer.