Ignore:
Timestamp:
Jan 28, 2011, 10:04:40 PM (14 years ago)
Author:
gav
Message:

Domain change on TaskProcedure and MaintenanceAction, continue task procedure rework.

Location:
branches/features/taskProcedureRework/grails-app/domain
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/features/taskProcedureRework/grails-app/domain/MaintenanceAction.groovy

    r760 r762  
    1111    Integer procedureStepNumber
    1212
    13     boolean deleted
     13    Boolean deleted
    1414    static transients = [ 'deleted' ]
    1515
  • 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;
     1import org.apache.commons.collections.list.LazyList
     2import org.apache.commons.collections.FactoryUtils
    33
    44class TaskProcedure {
    55
    6     Task parentTask
     6    Task linkedTask
     7
     8    def getDescription() { linkedTask.description }
     9    def getAsset() { linkedTask.primaryAsset }
     10
    711    List maintenanceActions = new ArrayList()
     12
    813    static hasMany = [tasks: Task, maintenanceActions: MaintenanceAction]
     14
     15    def getMaintenanceActionLazyList() {
     16        return LazyList.decorate(maintenanceActions, FactoryUtils.instantiateFactory(MaintenanceAction.class))
     17    }
    918
    1019    static mappedBy = [tasks:"taskProcedure"]
    1120
    1221    static mapping = {
    13         maintenanceActions cascade:"all,delete-orphan"
     22        maintenanceActions cascade:"all-delete-orphan"
    1423    }
    1524
     
    2231        "${this.id}"
    2332    }
    24 
    25     def getExpandableMaintenanceActionList() {
    26         return LazyList.decorate(maintenanceActions, FactoryUtils.instantiateFactory(MaintenanceAction.class))
    27     }
    2833}
Note: See TracChangeset for help on using the changeset viewer.