private void populateTable() { DefaultTableModel model = (DefaultTableModel) billjTable1.getModel(); model.setRowCount(0); for (Network n : business.getNetworkList()) { for (Enterprise enterprise : n.getEnterpriseDirectory().getEnterpriseList()) { if (enterprise instanceof DistributorEnterprise) { for (WorkRequest request : enterprise.getWorkQueue().getWorkRequestList()) { Object[] row = new Object[5]; row[0] = request; // row[] = request.getSender().getEmployee().getName(); row[1] = request.getReceiver() == null ? null : request.getReceiver().getEmployee().getName(); row[2] = ((ProviderWorkRequest) request).getOrder(); row[3] = ((ProviderWorkRequest) request).getTotalPrice(); row[4] = request.getStatus(); model.addRow(row); } } } } }
public void populateRequestTable() { DefaultTableModel model = (DefaultTableModel) workRequestJTable.getModel(); model.setRowCount(0); for (Organization org : enterprise.getOrganizationDirectory().getOrganizationList()) { if (org instanceof CareTeamOrganization) { for (WorkRequest request : org.getWorkQueue().getWorkRequestList()) { Object[] row = new Object[6]; row[0] = request; row[1] = request.getReceiver(); row[2] = request.getRequestDate(); row[3] = ((SurgeryOperationWorkRequest) request).getRequiredCareTeamSize(); row[4] = ((SurgeryOperationWorkRequest) request).getAssignedTeamSize(); row[5] = request.getStatus(); model.addRow(row); } } } }