private void setDynamicGridNewMotorAreaFindings(MotorChartAreaDetailVoCollection listMotorCharAreaDetail) { form.dyngrdMotor().getRows().clear(); if (listMotorCharAreaDetail == null) return; // Sort collection listMotorCharAreaDetail.sort(new FindingsAndMotorChartComparator()); for (int i = 0; i < listMotorCharAreaDetail.size(); i++) { MotorChartAreaDetailVo motorChartAreaDetailVo = listMotorCharAreaDetail.get(i); if (motorChartAreaDetailVo == null) continue; if (motorChartAreaDetailVo.getIsActive() != null && motorChartAreaDetailVo.getIsActive() == true) setDynamicGridNewMotorAreaRow(form.dyngrdMotor().getRows().newRow(), motorChartAreaDetailVo); } }
private MotorChartAreaDetailVoCollection getMotorChartAreaValue() { MotorChartAreaDetailVoCollection tempCollection = new MotorChartAreaDetailVoCollection(); for (int i = 0; i < form.dyngrdMotorArea().getRows().size(); i++) { DynamicGridRow row = form.dyngrdMotorArea().getRows().get(i); if (row == null || row.getValue() == null) continue; MotorChartAreaDetailVo rowValue = (MotorChartAreaDetailVo) row.getValue(); rowValue.setOrderNo(i); tempCollection.add(rowValue); } return tempCollection; }
private void setMotorChartArea(MotorChartAreaDetailVoCollection motorChartAreaDetailVoCollection) { // Clear Motor Area form.dyngrdMotorArea().getRows().clear(); // Sort collection by order motorChartAreaDetailVoCollection.sort(new MotorChartComparator()); // Check for null if (motorChartAreaDetailVoCollection == null) return; // Iterate through the collection for (int i = 0; i < motorChartAreaDetailVoCollection.size(); i++) { MotorChartAreaDetailVo motorChartDetails = motorChartAreaDetailVoCollection.get(i); // Add non-null variables to grid if (motorChartDetails != null) { setMotorChartDetailsRow(form.dyngrdMotorArea().getRows().newRow(), motorChartDetails); } } }
public MotorChartAreaDetailVoCollection listMotorCharAreaDetail() { String hqlString = "from MotorChartAreaDetail"; return MotorChartAreaDetailVoAssembler.createMotorChartAreaDetailVoCollectionFromMotorChartAreaDetail(getDomainFactory().find(hqlString)); }