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 WorkModel extends AbstractModel implements ItemModel<WorkModel> {
 
     public static enum WorkEvent {
      CHANGE_WORK_NAME, CHANGE_WORK_SOURCE_CLASS_NAME, CHANGE_INITIAL_TASK, ADD_WORK_TASK, REMOVE_WORK_TASK, ADD_PROPERTY, REMOVE_PROPERTY
     }

    
Default constructor.
 
     public WorkModel() {
     }

    
Convenience constructor for new non-linked instance.
 
     public WorkModel(
       String workName
     , String workSourceClassName
     ) {
         this. = workName;
         this. = workSourceClassName;
     }

    
Convenience constructor.
 
     public WorkModel(
       String workName
     , String workSourceClassName
     , WorkToInitialTaskModel initialTask
     , WorkTaskModel[] workTask
     , PropertyModel[] property
     ) {
         this. = workName;
         this. = workSourceClassName;
         this. = initialTask;
         if (workTask != null) {
             for (WorkTaskModel model : workTask) {
                 this..add(model);
             }
         }
         if (property != null) {
             for (PropertyModel model : property) {
                 this..add(model);
             }
         }
     }

    
Convenience constructor allowing XY initialising.
 
     public WorkModel(
       String workName
     , String workSourceClassName
     , WorkToInitialTaskModel initialTask
     , WorkTaskModel[] workTask
     , PropertyModel[] property
     , int x
     , int y
     ) {
         this. = workName;
         this. = workSourceClassName;
         this. = initialTask;
         if (workTask != null) {
             for (WorkTaskModel model : workTask) {
                 this..add(model);
             }
         }
         if (property != null) {
             for (PropertyModel model : property) {
                 this..add(model);
             }
         }
         this.setX(x);
         this.setY(y);
     }

    
Work name.
 
     private String workName;
 
     public String getWorkName() {
         return this.;
    }
    public void setWorkName(String workName) {
        String oldValue = this.;
        this. = workName;
        this.changeField(oldValuethis..);
    }

    
Work source class name.
    private String workSourceClassName;
    public String getWorkSourceClassName() {
        return this.;
    }
    public void setWorkSourceClassName(String workSourceClassName) {
        String oldValue = this.;
        this. = workSourceClassName;
    }

    
Initial task.
        return this.;
    }
    public void setInitialTask(WorkToInitialTaskModel initialTask) {
        WorkToInitialTaskModel oldValue = this.;
        this. = initialTask;
        this.changeField(oldValuethis..);
    }


    
Work task.
    private List<WorkTaskModelworkTask = new LinkedList<WorkTaskModel>();
    public List<WorkTaskModelgetWorkTasks() {
        return this.;
    }
    public void addWorkTask(WorkTaskModel workTask) {
        this.addItemToList(workTaskthis..);
    }
    public void removeWorkTask(WorkTaskModel workTask) {
        this.removeItemFromList(workTaskthis..);
    }

    
Property.
    private List<PropertyModelproperty = new LinkedList<PropertyModel>();
    public List<PropertyModelgetProperties() {
        return this.;
    }
    public void addProperty(PropertyModel property) {
        this.addItemToList(propertythis..);
    }
    public void removeProperty(PropertyModel property) {
        this.removeItemFromList(propertythis..);
    }


    
Remove Connections.
        RemoveConnectionsAction<WorkModel_action = new RemoveConnectionsAction<WorkModel>(this);
        _action.disconnect(this.);
        for (WorkTaskModel _cascade : this.) {
            _action.addCascadeModel(_cascade.removeConnections());
        }
        return _action;
    }
New to GrepCode? Check out our FAQ X