Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * 
   */
  package net.officefloor.model.desk;
  
  import java.util.List;
  
 
 
 @Generated("net.officefloor.model.generate.ModelGenerator")
 public class WorkTaskModel extends AbstractModel implements ItemModel<WorkTaskModel> {
 
     public static enum WorkTaskEvent {
      CHANGE_WORK_TASK_NAME, ADD_TASK_OBJECT, REMOVE_TASK_OBJECT, ADD_TASK, REMOVE_TASK
     }

    
Default constructor.
 
     public WorkTaskModel() {
     }

    
Convenience constructor for new non-linked instance.
 
     public WorkTaskModel(
       String workTaskName
     ) {
         this. = workTaskName;
     }

    
Convenience constructor.
 
     public WorkTaskModel(
       String workTaskName
     , WorkTaskObjectModel[] taskObject
     , WorkTaskToTaskModel[] task
     ) {
         this. = workTaskName;
         if (taskObject != null) {
             for (WorkTaskObjectModel model : taskObject) {
                 this..add(model);
             }
         }
         if (task != null) {
             for (WorkTaskToTaskModel model : task) {
                 this..add(model);
             }
         }
     }

    
Convenience constructor allowing XY initialising.
 
     public WorkTaskModel(
       String workTaskName
     , WorkTaskObjectModel[] taskObject
     , WorkTaskToTaskModel[] task
     , int x
     , int y
     ) {
         this. = workTaskName;
         if (taskObject != null) {
             for (WorkTaskObjectModel model : taskObject) {
                 this..add(model);
             }
         }
         if (task != null) {
             for (WorkTaskToTaskModel model : task) {
                 this..add(model);
             }
         }
         this.setX(x);
         this.setY(y);
     }

    
Work task name.
 
     private String workTaskName;
 
     public String getWorkTaskName() {
         return this.;
     }
 
     public void setWorkTaskName(String workTaskName) {
         String oldValue = this.;
         this. = workTaskName;
         this.changeField(oldValuethis..);
     }


    
Task object.
        return this.;
    }
    public void addTaskObject(WorkTaskObjectModel taskObject) {
        this.addItemToList(taskObjectthis..);
    }
    public void removeTaskObject(WorkTaskObjectModel taskObject) {
        this.removeItemFromList(taskObjectthis..);
    }

    
Task.
    public List<WorkTaskToTaskModelgetTasks() {
        return this.;
    }
    public void addTask(WorkTaskToTaskModel task) {
        this.addItemToList(taskthis..);
    }
    public void removeTask(WorkTaskToTaskModel task) {
        this.removeItemFromList(taskthis..);
    }


    
Remove Connections.
        _action.disconnect(this.);
        for (WorkTaskObjectModel _cascade : this.) {
            _action.addCascadeModel(_cascade.removeConnections());
        }
        return _action;
    }
New to GrepCode? Check out our FAQ X