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

Public Member Functions

 WorksheetItem (OrderItem orderItem, int preferredOrder)
 
int getPreferredOrder ()
 
int compareTo (Workload o)
 
- Public Member Functions inherited from org.turro.erp.task.Workload
 Workload (RequiredUsage requiredUsage)
 
 Workload (OrderItem orderItem)
 
RequiredUsage getRequiredUsage ()
 
OrderItem getOrderItem ()
 
boolean isChecked ()
 
void setChecked (boolean checked)
 
double getOrderUnits ()
 
void setOrderUnits (double orderUnits)
 
Task getTask ()
 
void setTask (Task task)
 

Detailed Description

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

Definition at line 32 of file WorksheetItem.java.

Constructor & Destructor Documentation

◆ WorksheetItem()

org.turro.erp.task.WorksheetItem.WorksheetItem ( OrderItem  orderItem,
int  preferredOrder 
)

Definition at line 36 of file WorksheetItem.java.

36  {
37  super(orderItem);
38  this.preferredOrder = preferredOrder;
39  }

Member Function Documentation

◆ compareTo()

int org.turro.erp.task.WorksheetItem.compareTo ( Workload  o)

Reimplemented from org.turro.erp.task.Workload.

Definition at line 46 of file WorksheetItem.java.

46  {
47  OrderItem orderItem1 = getOrderItem(),
48  orderItem2 = o.getOrderItem();
49  RequiredUsage requiredUsage1 = orderItem1.getRequiredUsage(),
50  requiredUsage2 = orderItem2.getRequiredUsage();
51  Task task1 = requiredUsage1.getTask(),
52  task2 = requiredUsage2.getTask();
53  OrderReference orderReference1 = task1.getOrderReference(),
54  orderReference2 = task2.getOrderReference();
55  WorkOrder workOrder1 = orderReference1.getWorkOrder(),
56  workOrder2 = orderReference2.getWorkOrder();
57  int result = CompareUtil.compare(workOrder1.getWorkOrderId(), workOrder2.getWorkOrderId());
58  if(result == 0) {
59  result = CompareUtil.compare(workOrder1.getId(), workOrder2.getId());
60  }
61  if(result == 0) {
62  result = CompareUtil.compare(orderReference1.getId(), orderReference2.getId());
63  }
64  if(result == 0) {
65  result = CompareUtil.compare(task1.getId(), task2.getId());
66  }
67  if(result == 0) {
68  result = CompareUtil.compare(requiredUsage1.getId(), requiredUsage2.getId());
69  }
70  if(result == 0) {
71  result = super.compareTo(o);
72  }
73  return result;
74  }
RequiredUsage getRequiredUsage()
Definition: OrderItem.java:249
Here is the call graph for this function:

◆ getPreferredOrder()

int org.turro.erp.task.WorksheetItem.getPreferredOrder ( )

Definition at line 41 of file WorksheetItem.java.

41  {
42  return preferredOrder;
43  }

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