BrightSide Workbench Full Report + Source Code
org.turro.erp.clone.TaskClone Class Reference
Inheritance diagram for org.turro.erp.clone.TaskClone:
Collaboration diagram for org.turro.erp.clone.TaskClone:

Public Member Functions

 TaskClone (Task task, ClonedEntitySet entities)
 
void setOrderReference (OrderReferenceClone orderReference)
 
Set< RequiredUsageClonegetRequiredUsages ()
 
Collection children ()
 
Object parent ()
 

Protected Member Functions

Task createClone ()
 
void applyData (Task entity)
 
void applyChildren (Task entity)
 
void assignEntities ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 39 of file TaskClone.java.

Constructor & Destructor Documentation

◆ TaskClone()

org.turro.erp.clone.TaskClone.TaskClone ( Task  task,
ClonedEntitySet  entities 
)

Definition at line 54 of file TaskClone.java.

54  {
55  super(task.getId(), task, entities);
56  name = task.getName();
57  description = task.getDescription();
58  supervised = task.getSupervised();
59  aptitudeDegree = task.getAptitudeDegree();
60  startDate = task.getStartDate();
61  endDate = task.getEndDate();
62  delivery = task.getDelivery();
63  milestone = task.isMilestone();
64  departmentId = task.getDepartmentId();
65  for(RequiredUsage requiredUsage : task.getRequiredUsages()) {
66  if(requiredUsage.getId() > 0) {
67  RequiredUsageClone ru = new RequiredUsageClone(requiredUsage, entities);
68  ru.setTask(this);
69  requiredUsages.add((RequiredUsageClone) entities.addClonedEntity(ru));
70  }
71  }
72  for(Predecessor predecessor : task.getPredecessors()) {
73  if(predecessor.getId() > 0) {
74  PredecessorClone pre = new PredecessorClone(predecessor, entities);
75  pre.setTask(this);
76  predecessors.add((PredecessorClone) entities.addClonedEntity(pre));
77  }
78  }
79  }
Here is the call graph for this function:

Member Function Documentation

◆ applyChildren()

void org.turro.erp.clone.TaskClone.applyChildren ( Task  entity)
protected

Definition at line 122 of file TaskClone.java.

122  {
123  for(RequiredUsageClone requiredUsageClone : requiredUsages) {
124  requiredUsageClone.applyChanges();
125  }
126  for(PredecessorClone predecessorClone : predecessors) {
127  predecessorClone.applyChanges();
128  }
129  }

◆ applyData()

void org.turro.erp.clone.TaskClone.applyData ( Task  entity)
protected

Definition at line 109 of file TaskClone.java.

109  {
110  entity.setName(name);
111  entity.setDescription(description);
112  entity.setSupervised(supervised);
113  entity.setAptitudeDegree(aptitudeDegree);
114  entity.setStartDate(startDate);
115  entity.setEndDate(endDate);
116  entity.setDelivery(delivery);
117  entity.setMilestone(milestone);
118  entity.setDepartmentId(departmentId);
119  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignEntities()

void org.turro.erp.clone.TaskClone.assignEntities ( )
protected

Definition at line 132 of file TaskClone.java.

132  {
133  for(RequiredUsageClone requiredUsageClone : requiredUsages) {
134  requiredUsageClone.assignEntities();
135  }
136  for(PredecessorClone predecessorClone : predecessors) {
137  predecessorClone.assignEntities();
138  }
139  }

◆ children()

Collection org.turro.erp.clone.TaskClone.children ( )

Implements org.turro.hierarchy.Hierarchical.

Definition at line 144 of file TaskClone.java.

144  {
145  ArrayList list = new ArrayList();
146  list.add(requiredUsages);
147  list.add(predecessors);
148  return list;
149  }

◆ createClone()

Task org.turro.erp.clone.TaskClone.createClone ( )
protected

Definition at line 90 of file TaskClone.java.

90  {
91  Task task = new Task();
92  applyData(task);
93  for(RequiredUsageClone requiredUsageClone : requiredUsages) {
94  requiredUsageClone.generateClone();
95  RequiredUsage requiredUsage = requiredUsageClone.getClone();
96  requiredUsage.setTask(task);
97  task.getRequiredUsages().add(requiredUsage);
98  }
99  for(PredecessorClone predecessorClone : predecessors) {
100  predecessorClone.generateClone();
101  Predecessor predecessor = predecessorClone.getClone();
102  predecessor.setTask(task);
103  task.getPredecessors().add(predecessor);
104  }
105  return task;
106  }
void applyData(Task entity)
Definition: TaskClone.java:109
Here is the call graph for this function:

◆ getRequiredUsages()

Set<RequiredUsageClone> org.turro.erp.clone.TaskClone.getRequiredUsages ( )

Definition at line 85 of file TaskClone.java.

85  {
86  return requiredUsages;
87  }

◆ parent()

Object org.turro.erp.clone.TaskClone.parent ( )

Implements org.turro.hierarchy.Hierarchical.

Definition at line 152 of file TaskClone.java.

152  {
153  return orderReference;
154  }

◆ setOrderReference()

void org.turro.erp.clone.TaskClone.setOrderReference ( OrderReferenceClone  orderReference)

Definition at line 81 of file TaskClone.java.

81  {
82  this.orderReference = orderReference;
83  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: