private void setHrgGrid(grdListGrid grid, HrgConfigLiteVoCollection listHRGConfiguration) { // Clear the grid grid.getRows().clear(); // Terminate the execution if a null collection if (listHRGConfiguration == null) return; // Add a new row for each non null VO in the collection for (int i = 0; i < listHRGConfiguration.size(); i++) { HrgConfigLiteVo hrgConfiguration = listHRGConfiguration.get(i); // Skip null VOs in the collection if (hrgConfiguration == null) continue; // Create the row for the VO setGridRow(grid.getRows().newRow(), hrgConfiguration); } }
public HrgConfigLiteVo getHRGCode(String code) { if(code == null || code.trim().length() == 0) return null; HrgConfigLiteVoCollection coll = HrgConfigLiteVoAssembler.createHrgConfigLiteVoCollectionFromHrgConfig(getDomainFactory().find("from HrgConfig hrg WHERE hrg.hRGCode = :HRGCode", new String[] {"HRGCode"}, new Object[] {code})); if (coll != null && coll.size()>0) return coll.get(0); return null; }