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

Public Member Functions

 OrderReferenceClone (OrderReference orderReference, ClonedEntitySet entities)
 
void setWorkOrder (WorkOrderClone workOrder)
 
void setUnits (double units)
 
Collection children ()
 
Object parent ()
 

Protected Member Functions

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

Detailed Description

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

Definition at line 33 of file OrderReferenceClone.java.

Constructor & Destructor Documentation

◆ OrderReferenceClone()

org.turro.erp.clone.OrderReferenceClone.OrderReferenceClone ( OrderReference  orderReference,
ClonedEntitySet  entities 
)

Definition at line 44 of file OrderReferenceClone.java.

44  {
45  super(orderReference.getId(), orderReference, entities);
46  description = orderReference.getDescription();
47  productId = orderReference.getProductId();
48  orderRef = orderReference.getOrderRef();
49  noFraction = orderReference.isNoFraction();
50  quantity = orderReference.getQuantity();
51  price = orderReference.getPrice();
52  tax = orderReference.getTax();
53  retention = orderReference.getRetention();
54  serviceId = orderReference.getServiceId();
55  for(Task task : orderReference.getTasks()) {
56  if(task.getId() > 0) {
57  TaskClone t = new TaskClone(task, entities);
58  t.setOrderReference(this);
59  tasks.add((TaskClone) entities.addClonedEntity(t));
60  }
61  }
62  old_units = quantity;
63  }
Here is the call graph for this function:

Member Function Documentation

◆ applyChildren()

void org.turro.erp.clone.OrderReferenceClone.applyChildren ( OrderReference  entity)
protected

Definition at line 107 of file OrderReferenceClone.java.

107  {
108  for(TaskClone taskClone : tasks) {
109  taskClone.applyChanges();
110  }
111  }

◆ applyData()

void org.turro.erp.clone.OrderReferenceClone.applyData ( OrderReference  entity)
protected

Definition at line 94 of file OrderReferenceClone.java.

94  {
95  entity.setDescription(description);
96  entity.setProductId(productId);
97  entity.setOrderRef(orderRef);
98  entity.setNoFraction(noFraction);
99  entity.setQuantity(quantity);
100  entity.setPrice(price);
101  entity.setTax(tax);
102  entity.setRetention(retention);
103  entity.setServiceId(serviceId);
104  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignEntities()

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

Definition at line 114 of file OrderReferenceClone.java.

114  {
115  for(TaskClone taskClone : tasks) {
116  taskClone.assignEntities();
117  }
118  }

◆ children()

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

Implements org.turro.hierarchy.Hierarchical.

Definition at line 123 of file OrderReferenceClone.java.

123  {
124  return tasks;
125  }
Here is the caller graph for this function:

◆ createClone()

OrderReference org.turro.erp.clone.OrderReferenceClone.createClone ( )
protected

Definition at line 81 of file OrderReferenceClone.java.

81  {
82  OrderReference orderReference = new OrderReference();
83  applyData(orderReference);
84  for(TaskClone taskClone : tasks) {
85  taskClone.generateClone();
86  Task task = taskClone.getClone();
87  task.setOrderReference(orderReference);
88  orderReference.getTasks().add(task);
89  }
90  return orderReference;
91  }
Here is the call graph for this function:

◆ parent()

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

Implements org.turro.hierarchy.Hierarchical.

Definition at line 128 of file OrderReferenceClone.java.

128  {
129  return workOrder;
130  }

◆ setUnits()

void org.turro.erp.clone.OrderReferenceClone.setUnits ( double  units)

Definition at line 69 of file OrderReferenceClone.java.

69  {
70  double ratio =
71  (units == 0.0 || old_units == 0.0d) ?
72  1 : units / old_units;
73  for(Object t : children()) {
74  for(RequiredUsageClone ru : ((TaskClone) t).getRequiredUsages()) {
75  ru.setUnitRatio(ratio);
76  }
77  }
78  }
Here is the call graph for this function:

◆ setWorkOrder()

void org.turro.erp.clone.OrderReferenceClone.setWorkOrder ( WorkOrderClone  workOrder)

Definition at line 65 of file OrderReferenceClone.java.

65  {
66  this.workOrder = workOrder;
67  }
Here is the caller graph for this function:

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