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

Classes

class  OrderItemSummary
 

Public Member Functions

 OrderItemModel (List data, Grid grid)
 
- Public Member Functions inherited from org.turro.jpa.model.GroupModelManager
 GroupModelManager (List list, Comparator comparator, Grid grid)
 
void removeItem (IDaoEntity object)
 
void addItem (IDaoEntity object)
 
void replaceItem (IDaoEntity object)
 
void removeGroupsDataListener (GroupsDataListener l)
 
void addGroupsDataListener (GroupsDataListener l)
 
void sort (Comparator cmpr, boolean ascending, int col)
 
boolean addOpenGroup (int groupIndex)
 
boolean removeOpenGroup (int groupIndex)
 
boolean isGroupOpened (int groupIndex)
 
boolean hasGroupfoot (int groupIndex)
 
void group (Comparator cmpr, boolean ascending, int col)
 
Object getGroupfoot (int groupIndex)
 
int getGroupCount ()
 
Object getGroup (int groupIndex)
 
int getChildCount (int groupIndex)
 
Object getChild (int groupIndex, int index)
 

Protected Member Functions

Object createGroupFoot (Object[] groupdata, int index, int col)
 
Object createGroupHead (Object[] groupdata, int index, int col)
 
- Protected Member Functions inherited from org.turro.jpa.model.GroupModelManager
void fireEvent (int type, int groupIndex, int index0, int index1)
 
boolean createGroupClose (Object[] groupdata, int index, int col)
 

Detailed Description

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

Definition at line 29 of file OrderItemModel.java.

Constructor & Destructor Documentation

◆ OrderItemModel()

org.turro.erp.purchase.OrderItemModel.OrderItemModel ( List  data,
Grid  grid 
)

Definition at line 38 of file OrderItemModel.java.

38  {
39  super(data, new OrderItemComparator(), grid);
40  }

Member Function Documentation

◆ createGroupFoot()

Object org.turro.erp.purchase.OrderItemModel.createGroupFoot ( Object[]  groupdata,
int  index,
int  col 
)
protected

Reimplemented from org.turro.jpa.model.GroupModelManager.

Definition at line 43 of file OrderItemModel.java.

43  {
44  OrderItemSummary summary = new OrderItemSummary();
45  summary.items = groupdata.length;
46  summary.orders = groupdata;
47  for(Object o : groupdata) {
48  if(o instanceof OrderItem) {
49  OrderItem oi = (OrderItem) o;
50  summary.cost += oi.getAmount();
51  summary.quatity += oi.getUnits() * oi.getDedication();
52  }
53  }
54  return summary;
55  }
Here is the call graph for this function:

◆ createGroupHead()

Object org.turro.erp.purchase.OrderItemModel.createGroupHead ( Object[]  groupdata,
int  index,
int  col 
)
protected

Reimplemented from org.turro.jpa.model.GroupModelManager.

Definition at line 58 of file OrderItemModel.java.

58  {
59  return super.createGroupHead(groupdata, index, col);
60  }

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